-
Notifications
You must be signed in to change notification settings - Fork 162
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
Avoid net.ResolveUDPAddr in snet.UDPAddrFromString #3662
Conversation
Parse the host IP, port directly instead of using net.ResolveUDPAddr, which also resolves hostnames. Hostnames should not be considered inside SCION addresses. Fixes scionproto#3654
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.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @matzf)
go/lib/snet/udpaddr.go, line 79 at r1 (raw file):
} port, err := strconv.Atoi(rawPort) if err != nil || 0 > port || port > 65535 {
use strconv.ParseUint(rawPort, 10, 16)
instead
Review feedback
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @oncilla)
go/lib/snet/udpaddr.go, line 79 at r1 (raw file):
Previously, Oncilla wrote…
use
strconv.ParseUint(rawPort, 10, 16)
instead
Done.
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
Parse the host IP, port directly instead of using net.ResolveUDPAddr, which also resolves hostnames. Hostnames should not be considered inside SCION addresses. Fixes scionproto#3654
Parse the host IP, port directly instead of using net.ResolveUDPAddr, which also resolves hostnames. Hostnames should not be considered inside SCION addresses.
Fixes #3654
This change is