[DEV_ATTR_UNICAST_FLOOD] = { .name ="unicast_flood", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_SENDREDIRECTS] = { .name = "sendredirects", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_NEIGHLOCKTIME] = { .name = "neighlocktime", .type = BLOBMSG_TYPE_INT32 },
+ [DEV_ATTR_ISOLATE] = { .name = "isolate", .type = BLOBMSG_TYPE_BOOL },
};
const struct uci_blob_param_list device_attr_list = {
s->flags |= DEV_OPT_SENDREDIRECTS;
}
+ if ((cur = tb[DEV_ATTR_ISOLATE])) {
+ s->isolate = blobmsg_get_bool(cur);
+ s->flags |= DEV_OPT_ISOLATE;
+ }
+
device_set_disabled(dev, disabled);
}
DEV_ATTR_NEIGHGCSTALETIME,
DEV_ATTR_SENDREDIRECTS,
DEV_ATTR_NEIGHLOCKTIME,
+ DEV_ATTR_ISOLATE,
__DEV_ATTR_MAX,
};
DEV_OPT_MULTICAST_FAST_LEAVE = (1 << 20),
DEV_OPT_SENDREDIRECTS = (1 << 21),
DEV_OPT_NEIGHLOCKTIME = (1 << 22),
+ DEV_OPT_ISOLATE = (1 << 23),
};
/* events broadcasted to all users of a device */
bool learning;
bool unicast_flood;
bool sendredirects;
+ bool isolate;
};
/*
system_set_dev_sysctl("/sys/class/net/%s/brport/hairpin_mode", dev->ifname, val);
}
+static void system_bridge_set_isolate_mode(struct device *dev, const char *val)
+{
+ system_set_dev_sysctl("/sys/class/net/%s/brport/isolate_mode", dev->ifname, val);
+}
+
static void system_bridge_set_multicast_router(struct device *dev, const char *val, bool bridge)
{
system_set_dev_sysctl(bridge ? "/sys/class/net/%s/bridge/multicast_router" :
!dev->settings.unicast_flood)
system_bridge_set_unicast_flood(dev, "0");
+ if (dev->settings.flags & DEV_OPT_ISOLATE &&
+ dev->settings.isolate)
+ system_bridge_set_isolate_mode(dev, "1");
+
return ret;
}