summaryrefslogtreecommitdiff
path: root/bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'bridge.c')
-rw-r--r--bridge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge.c b/bridge.c
index fd553dc..9da5314 100644
--- a/bridge.c
+++ b/bridge.c
@@ -33,6 +33,7 @@ enum {
BRIDGE_ATTR_MAX_AGE,
BRIDGE_ATTR_BRIDGE_EMPTY,
BRIDGE_ATTR_MULTICAST_QUERIER,
+ BRIDGE_ATTR_HASH_MAX,
__BRIDGE_ATTR_MAX
};
@@ -47,6 +48,7 @@ static const struct blobmsg_policy bridge_attrs[__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] = {
@@ -551,6 +553,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
cfg->forward_delay = 2;
cfg->igmp_snoop = true;
cfg->multicast_querier = true;
+ cfg->hash_max = 512;
cfg->bridge_empty = false;
cfg->priority = 0x7FFF;
@@ -569,6 +572,9 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
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;