-
Notifications
You must be signed in to change notification settings - Fork 881
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 NDP proxying on bridge networks #1316
base: master
Are you sure you want to change the base?
Conversation
I'm not sure the CI failure is related to my changes. The three most recent pull requests all failed on the same test, and one of them is only a documentation change. |
b3dc86f
to
b026e38
Compare
@@ -185,6 +186,7 @@ func (ncfg *networkConfiguration) UnmarshalJSON(b []byte) error { | |||
ncfg.BridgeName = nMap["BridgeName"].(string) | |||
ncfg.EnableIPv6 = nMap["EnableIPv6"].(bool) | |||
ncfg.EnableIPMasquerade = nMap["EnableIPMasquerade"].(bool) | |||
ncfg.NDPProxyInterface = nMap["NDPProxyInterface"].(string) |
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.
Given this new field is not there for existing bridge network in store, you need to first check if the entry exists in the map before converting to string, or it will panic.
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.
Good catch. I will take care of that tonight and update the PR.
- Proxying is enabled via the network label com.docker.network.bridge.ndp_proxy_interface=<interface> fixes moby#1159 Signed-off-by: Zvi "CtrlZvi" Effron <[email protected]>
if config.NDPProxyInterface != "" && config.EnableIPv6 { | ||
link, err := d.nlh.LinkByName(config.NDPProxyInterface) | ||
if err != nil { | ||
return err |
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.
Please format and return a more expressive error, otherwise caller will receive a simple link not found
, which does not help much.
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'm not familiar with go;
Is this what you need:
return fmt.Errorf("Link not found: %v", err)
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.
Simply return fmt.Errorf("could not find link for ndp proxy interface %q: %v", config.NDPProxyInterface, err)
ping @CtrlZvi |
1 similar comment
ping @CtrlZvi |
fixes #1159
Signed-off-by: Zvi "CtrlZvi" Effron [email protected]