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

Use sysfs to set hairpin mode #412

Merged
merged 1 commit into from
Jul 24, 2015
Merged

Use sysfs to set hairpin mode #412

merged 1 commit into from
Jul 24, 2015

Conversation

mrjana
Copy link
Contributor

@mrjana mrjana commented Jul 23, 2015

Set the hairpin mode using the sysfs interface which
looks like it is working all the way to the oldest
of RHEL6.6 kernels.

Signed-off-by: Jana Radhakrishnan mrjana@docker.com

@mrjana mrjana force-pushed the bugs branch 13 times, most recently from 66889d3 to a37f73d Compare July 24, 2015 00:53
@@ -772,6 +775,37 @@ func addToBridge(ifaceName, bridgeName string) error {
return ioctlAddToBridge(iface, master)
}

func setHairpinMode(link netlink.Link, enable bool) error {
err := netlink.LinkSetHairpin(link, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't the second parameter be enable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aboch That's correct. Let me fix it

Set the hairpin mode using the sysfs interface which
looks like it is working all the way to the oldest
of RHEL6.6 kernels.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@aboch
Copy link
Contributor

aboch commented Jul 24, 2015

LGTM

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 24, 2015

LGTM
Seems legit, though we had problems in 2.6 before with this. But it's better than nothing.

aboch added a commit that referenced this pull request Jul 24, 2015
Use sysfs to set hairpin mode
@aboch aboch merged commit bf4ea43 into moby:master Jul 24, 2015
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.

None yet

3 participants