BRIDGE_ATTR_MAX_AGE,
BRIDGE_ATTR_BRIDGE_EMPTY,
BRIDGE_ATTR_MULTICAST_QUERIER,
+ BRIDGE_ATTR_HASH_MAX,
__BRIDGE_ATTR_MAX
};
[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL },
+ [BRIDGE_ATTR_HASH_MAX] = { "hash_max", BLOBMSG_TYPE_INT32 },
};
static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX] = {
cfg->forward_delay = 2;
cfg->igmp_snoop = true;
cfg->multicast_querier = true;
+ cfg->hash_max = 512;
cfg->bridge_empty = false;
cfg->priority = 0x7FFF;
if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
cfg->multicast_querier = blobmsg_get_bool(cur);
+ if ((cur = tb[BRIDGE_ATTR_HASH_MAX]))
+ cfg->hash_max = blobmsg_get_u32(cur);
+
if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
cfg->ageing_time = blobmsg_get_u32(cur);
cfg->flags |= BRIDGE_OPT_AGEING_TIME;
int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
{
+ char buf[64];
unsigned long args[4] = {};
if (ioctl(sock_ioctl, SIOCBRADDBR, bridge->ifname) < 0)
system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
bridge->ifname, cfg->multicast_querier ? "1" : "0");
+ snprintf(buf, sizeof(buf), "%i", cfg->hash_max);
+ system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/hash_max",
+ bridge->ifname, buf);
+
args[0] = BRCTL_SET_BRIDGE_PRIORITY;
args[1] = cfg->priority;
system_bridge_if(bridge->ifname, NULL, SIOCDEVPRIVATE, &args);