inbound tag for dns requests

This commit is contained in:
Darien Raymond committed 2019-01-16 20:32:41 +01:00
1 parent 1cf07c3379
commit 44d87ed642
4 files changed
+65 -40

No files matched your search

+5 -1
View File
@@ -303,7 +303,11 @@ func (s *ClassicNameServer) sendQuery(ctx context.Context, domain string, option
for _, msg := range msgs {
b, err := dns.PackMessage(msg)
common.Must(err)
s.udpServer.Dispatch(context.Background(), s.address, b)
udpCtx := context.Background()
if inbound := session.InboundFromContext(ctx); inbound != nil {
udpCtx = session.ContextWithInbound(udpCtx, inbound)
}
s.udpServer.Dispatch(udpCtx, s.address, b)
}
}