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

backend/vxlan: Set the netmask of the IP used for the vxlan device #576

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

tomdee
Copy link
Contributor

@tomdee tomdee commented Dec 13, 2016

Use a /32 netmask for the vxlan device. This avoids the kernel programming
broadcast routes (which won't work).

Unicast routes are already explicitly programmed so there's no need to
use a broader netmask.

Use a /32 netmask for the vxlan device. This avoids the kernel programming
broadcast routes (which won't work).

Unicast routes are already explicitly programmed so there's no need to
use a broader netmask.
// Ensure that the device has a /32 address so that no broadcast routes are created.
// This IP is just used as a source address for host to workload traffic (so
// the return path for the traffic has a decent address to use as the destination)
ipn.Mask = net.CIDRMask(32, 32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really minor nit: may want this in the caller if want to keep setAddr4 generic. Or if this is the only use case (which I believe it is), may as well only require caller to provide anIP rather than IPNet.

@aaronlevy
Copy link
Contributor

@tomdee I did manual tests against the repo steps in #533 and all went well.

On 2 nodes tested:

host to pod in both directions
pod to pod in both directions

Rebooted each node and retried the above then rebooted the next node and tried again.

All worked!

@tomdee tomdee merged commit fb25c99 into flannel-io:master Dec 15, 2016
@tomdee
Copy link
Contributor Author

tomdee commented Dec 15, 2016

Cool! Merging.

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

Successfully merging this pull request may close these issues.

2 participants