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 NDP proxying on bridge networks #1316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CtrlZvi
Copy link

@CtrlZvi CtrlZvi commented Jul 10, 2016

  • Proxying is enabled via the network label com.docker.network.bridge.ndp_proxy_interface=

fixes #1159

Signed-off-by: Zvi "CtrlZvi" Effron [email protected]

@CtrlZvi
Copy link
Author

CtrlZvi commented Jul 10, 2016

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.

@CtrlZvi CtrlZvi force-pushed the 1159-ndp-proxy branch 2 times, most recently from b3dc86f to b026e38 Compare July 17, 2016 20:25
@@ -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)
Copy link
Contributor

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.

Copy link
Author

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
Copy link
Contributor

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.

Copy link

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)

Copy link
Contributor

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)

@aboch
Copy link
Contributor

aboch commented Sep 2, 2016

ping @CtrlZvi

1 similar comment
@aboch
Copy link
Contributor

aboch commented Oct 19, 2016

ping @CtrlZvi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Neighbor Proxy for IPv6 Networks
5 participants