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

Restore disable_ipv6 sysctl after removing a device from bridge or bond #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bonding.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ bonding_disable_port(struct bonding_port *bp, bool keep_dev)
if (!keep_dev)
device_release(&bp->dev);

if (bp->dev.dev->settings.flags & DEV_OPT_IPV6) {
bp->dev.dev->settings.ipv6 = 1;
bp->dev.dev->settings.flags &= ~DEV_OPT_IPV6;
}

return 0;
}

Expand Down
5 changes: 5 additions & 0 deletions bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ bridge_disable_member(struct bridge_member *bm, bool keep_dev)
if (!keep_dev)
device_release(&bm->dev);

if (bm->dev.dev->settings.flags & DEV_OPT_IPV6) {
bm->dev.dev->settings.ipv6 = 1;
bm->dev.dev->settings.flags &= ~DEV_OPT_IPV6;
}

device_broadcast_event(&bst->dev, DEV_EVENT_TOPO_CHANGE);

return 0;
Expand Down