diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2014-04-07 13:30:52 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-04-26 21:44:19 +0200 |
commit | 98ca67469da70accd710b14c28e77be2126170a8 (patch) | |
tree | 3cc649f08f9743fff2f8367dee74162ed30ace96 /bridge.c | |
parent | 08d35c7a59a182b9ef05d95ca3c583806b2ba924 (diff) |
netifd: Add interface config support to enable/disable IPv6 in the kernel per device
Main use case is being able to disable IPv6 on (a) WAN interface(s) when only IPv4 connectivity is offered or 6rd is used.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'bridge.c')
-rw-r--r-- | bridge.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -154,6 +154,12 @@ bridge_enable_member(struct bridge_member *bm) if (!bm->present) return 0; + /* Disable IPv6 for bridge members */ + if (!(bm->dev.dev->settings.flags & DEV_OPT_IPV6)) { + bm->dev.dev->settings.ipv6 = 0; + bm->dev.dev->settings.flags |= DEV_OPT_IPV6; + } + ret = device_claim(&bm->dev); if (ret < 0) goto error; |