-
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
gateway: determine default local IP #3936
Conversation
c52c3d7
to
9ae8256
Compare
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 6 of 6 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @matzf and @scrye)
go/lib/snet/addrutil/addrutil.go, line 103 at r1 (raw file):
// This returns a sensible but arbitrary local IP. In the general case the // local IP would depend on the next hop of selected path. This approach will // not work in more complicated setups where e.g. different network interface
s/interface/interfaces
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: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @oncilla and @scrye)
go/lib/snet/addrutil/addrutil.go, line 103 at r1 (raw file):
Previously, Oncilla (Dominik Roos) wrote…
s/interface/interfaces
Well spotted 👀 Done.
Determine default local IP for SIG as documented in config sample, analogous to old SIG implementation. Instead of copying the findDefaultLocalIP logic again, move to addrutil.DefaultLocalIP library function.
15eabf3
to
be142c9
Compare
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 2 of 2 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @scrye)
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: all files reviewed, 4 unresolved discussions (waiting on @matzf)
a discussion (no related file):
I was thinking about adding a request for documenting the behavior in the Gateway manual, but I think I'll take care of that afterwards (the behaviors for some configuration options are quite complex, and need a lot of documentation).
Found a few nits here and there, but otherwise we can merge this.
go/lib/snet/addrutil/addrutil.go, line 99 at r2 (raw file):
} // DefaultLocalIP returns _a_ IP of this host in the local AS.
Nit: "a" -> "an"
go/lib/snet/addrutil/addrutil.go, line 107 at r2 (raw file):
// // This is a simple workaround for not being able to use wildcard addresses // with snet. Once a available, a wildcard address should be used instead and
Remove "a" before "available".
go/lib/snet/addrutil/addrutil.go, line 108 at r2 (raw file):
// This is a simple workaround for not being able to use wildcard addresses // with snet. Once a available, a wildcard address should be used instead and // this should simply be removed.
Remove "simply".
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: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @oncilla and @scrye)
go/lib/snet/addrutil/addrutil.go, line 107 at r2 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Remove "a" before "available".
Done.
go/lib/snet/addrutil/addrutil.go, line 108 at r2 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Remove "simply".
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 r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @scrye)
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: complete! all files reviewed, all discussions resolved
Determine default local IP for SIG as documented in config sample,
analogous to old SIG implementation.
Instead of copying the findDefaultLocalIP logic again, move to
addrutil.DefaultLocalIP library function.
Additionally includes losely related small cleanup in sciond.TopologyQuerier.(was included in 3938).Closes #3933.
This change is