summaryrefslogtreecommitdiffhomepage
path: root/bridge.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-04-23 16:04:36 +0200
committerJo-Philipp Wich <jow@openwrt.org>2013-04-23 16:05:14 +0200
commit0f0fa4f1c8cb4f793c3dddd1edd1420483e9e325 (patch)
tree484429bf1921ed106c634ed22b2f2ab28eeadc71 /bridge.c
parent2008ae9a80fb82b0018fd510043c291b58e7cc46 (diff)
set default bridge priority to 0x7FFF
Diffstat (limited to 'bridge.c')
-rw-r--r--bridge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bridge.c b/bridge.c
index 83c9d79..a970d50 100644
--- a/bridge.c
+++ b/bridge.c
@@ -464,6 +464,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
cfg->stp = false;
cfg->forward_delay = 2;
cfg->igmp_snoop = true;
+ cfg->priority = 0x7FFF;
if ((cur = tb[BRIDGE_ATTR_STP]))
cfg->stp = blobmsg_get_bool(cur);
@@ -471,10 +472,8 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
if ((cur = tb[BRIDGE_ATTR_FORWARD_DELAY]))
cfg->forward_delay = blobmsg_get_u32(cur);
- if ((cur = tb[BRIDGE_ATTR_PRIORITY])) {
+ if ((cur = tb[BRIDGE_ATTR_PRIORITY]))
cfg->priority = blobmsg_get_u32(cur);
- cfg->flags |= BRIDGE_OPT_PRIORITY;
- }
if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
cfg->igmp_snoop = blobmsg_get_bool(cur);