Skip to content
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

Support CoreDNS 1.8 #31

Merged
merged 2 commits into from
Dec 16, 2020
Merged

Support CoreDNS 1.8 #31

merged 2 commits into from
Dec 16, 2020

Conversation

jplot
Copy link
Contributor

@jplot jplot commented Dec 14, 2020

Closes #30

utils.go Outdated
b.SocketProto = tap.SocketProtocol_UDP
}
var ta net.Addr = &net.UDPAddr{IP: ip, Port: int(port)}
t := f.net // state.Proto() ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a doubt here, would it not be better to use state.Proto()?

Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jplot Please pass linter and re-commit your changes with flag -s to pass DCO check.

if tapper == nil {
return nil
}
func toDnstap(f *Fanout, host string, state *request.Request, reply *dns.Msg, start time.Time) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like sync up with https://github.com/coredns/coredns/blob/master/plugin/forward/dnstap.go#L16-L58

But it should be fine for now.

@miekg Let us know if we can make some stuff from the forward plugin reusable.

Signed-off-by: Jonathan PHILIPPE <pretrine@gmail.com>
@denis-tingaikin
Copy link
Member

Note: Linter job has failed with:

utils.go:53:21: Error return value of `msg.SetQueryAddress` is not checked (errcheck)
	msg.SetQueryAddress(q, ta)
	                   ^
utils.go:71:22: Error return value of `msg.SetQueryAddress` is not checked (errcheck)

Also you can run linter locally via golangci-lint

Signed-off-by: Jonathan PHILIPPE <pretrine@gmail.com>
@jplot jplot marked this pull request as ready for review December 16, 2020 19:13
@denis-tingaikin
Copy link
Member

@jplot Thanks!

@denis-tingaikin denis-tingaikin merged commit 84902c6 into networkservicemesh:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build with CoreDNS 1.8.0
2 participants