-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dns: fix dnsutils #1330
dns: fix dnsutils #1330
Conversation
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@@ -44,7 +44,7 @@ func (h *dnsConfigsHandler) ServeDNS(ctx context.Context, rp dns.ResponseWriter, | |||
for _, conf := range value { | |||
ips := make([]url.URL, len(conf.DnsServerIps)) | |||
for i, ip := range conf.DnsServerIps { | |||
ips[i] = url.URL{Scheme: "tcp", Host: ip} | |||
ips[i] = url.URL{Scheme: "udp", Host: ip} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should support both schemes, because we don't know the right scheme
ips := make([]url.URL,0, len(conf.DnsServerIps) * 2)
for i, ip := range conf.DnsServerIps {
ips = append(ips, &url.URL{Scheme: "udp", Host: ip}
ips = append(ips, &url.URL{Scheme: "tcp", Host: ip}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
It was quickly! |
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1330 Commit: cbf511a Author: Artem Glazychev Date: 2022-07-22 17:21:55 +0700 Message: - dns: fix dnsutils (#1330) * dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
* dns: use upd instead of tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Add tcp Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> * Fix cache chain element Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: Artem Glazychev artem.glazychev@xored.com
Description
Fixes:
Added UDP:
Most DNS transactions take place over UDP
- https://datatracker.ietf.org/doc/html/rfc5966Fix cache chain element - we need to store the whole
dns.Question
becauseQType
is also importantThis PR also adds some logs.
Issue link
How Has This Been Tested?
Types of changes