-
Notifications
You must be signed in to change notification settings - Fork 672
Conversation
Now that Go 1.10 has removed the issue which made us do this.
19a638d
to
c2c1441
Compare
@@ -1,10 +1,8 @@ | |||
package net |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
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.
Nice! Left a few nit picks.
// for more details and make sure that you understand the implications before | ||
// using the function! | ||
func WithNetNSUnsafe(ns netns.NsHandle, work func() error) error { | ||
func WithNetNS(ns netns.NsHandle, work func() error) error { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
net/netdev.go
Outdated
|
||
for _, link := range links { | ||
if _, found := indexes[link.Attrs().Index]; found { | ||
netdev, err := LinkToNetDev(link) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
net/veth.go
Outdated
for _, link := range links { | ||
ifName := link.Attrs().Name | ||
if strings.HasPrefix(ifName, prefix) { | ||
ConfigureARPCache(rootPath+"/proc", ifName) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
net/veth.go
Outdated
// NB: This function can be used only by a process that terminates immediately | ||
// after calling the function as it changes netns via WithNetNSLinkUnsafe. | ||
// ConfigureARP is a helper for the Docker plugin which doesn't set the addresses itself | ||
func ConfigureArp(prefix, rootPath string) error { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
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.
LGTM. However, some tests became flaky (maybe because of faster weave?).
Now that Go 1.10 has removed the issue which made us do this.
Less faffing around, more efficient.