X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vswitchd%2Fbridge.c;h=d99d6a1cd4746e5c6ad4c3635827f63ac7265234;hb=8402c74b186e28c53ad51fc8813aebe64a12cd7c;hp=94668a733f9a316912bbf70205f3fa49fae06399;hpb=299016266ed13376a7d671f66d4e0181b41098e3;p=sliver-openvswitch.git diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 94668a733..d99d6a1cd 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -150,6 +150,7 @@ static void bridge_refresh_ofp_port(struct bridge *); static void bridge_configure_datapath_id(struct bridge *); static void bridge_configure_flow_eviction_threshold(struct bridge *); static void bridge_configure_netflow(struct bridge *); +static void bridge_configure_forward_bpdu(struct bridge *); static void bridge_configure_sflow(struct bridge *, int *sflow_bridge_number); static void bridge_configure_remotes(struct bridge *, const struct sockaddr_in *managers, @@ -414,6 +415,7 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) bridge_configure_mirrors(br); bridge_configure_datapath_id(br); bridge_configure_flow_eviction_threshold(br); + bridge_configure_forward_bpdu(br); bridge_configure_remotes(br, managers, n_managers); bridge_configure_netflow(br); bridge_configure_sflow(br, &sflow_bridge_number); @@ -982,6 +984,20 @@ bridge_configure_flow_eviction_threshold(struct bridge *br) ofproto_set_flow_eviction_threshold(br->ofproto, threshold); } +/* Set forward BPDU option. */ +static void +bridge_configure_forward_bpdu(struct bridge *br) +{ + const char *forward_bpdu_str; + bool forward_bpdu = false; + + forward_bpdu_str = bridge_get_other_config(br->cfg, "forward-bpdu"); + if (forward_bpdu_str && !strcmp(forward_bpdu_str, "true")) { + forward_bpdu = true; + } + ofproto_set_forward_bpdu(br->ofproto, forward_bpdu); +} + static void bridge_pick_local_hw_addr(struct bridge *br, uint8_t ea[ETH_ADDR_LEN], struct iface **hw_addr_iface)