Skip to content

Support NDP proxying on bridge networks#1316

Open
CtrlZvi wants to merge 1 commit into
moby:masterfrom
CtrlZvi:1159-ndp-proxy
Open

Support NDP proxying on bridge networks#1316
CtrlZvi wants to merge 1 commit into
moby:masterfrom
CtrlZvi:1159-ndp-proxy

Conversation

@CtrlZvi

@CtrlZvi CtrlZvi commented Jul 10, 2016

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

fixes #1159

Signed-off-by: Zvi "CtrlZvi" Effron viz+GitHub@flippedperspective.com

@CtrlZvi

CtrlZvi commented Jul 10, 2016

Copy link
Copy Markdown
Author

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
Comment thread drivers/bridge/bridge_store.go Outdated
ncfg.BridgeName = nMap["BridgeName"].(string)
ncfg.EnableIPv6 = nMap["EnableIPv6"].(bool)
ncfg.EnableIPMasquerade = nMap["EnableIPMasquerade"].(bool)
ncfg.NDPProxyInterface = nMap["NDPProxyInterface"].(string)

Copy link
Copy Markdown
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
Copy Markdown
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 <viz+GitHub@flippedperspective.com>
Comment thread drivers/bridge/bridge.go
if config.NDPProxyInterface != "" && config.EnableIPv6 {
link, err := d.nlh.LinkByName(config.NDPProxyInterface)
if err != nil {
return err

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

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
Copy Markdown
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

aboch commented Sep 2, 2016

Copy link
Copy Markdown
Contributor

ping @CtrlZvi

1 similar comment
@aboch

aboch commented Oct 19, 2016

Copy link
Copy Markdown
Contributor

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