aboutsummaryrefslogtreecommitdiff
path: root/vswitchd/bridge.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-10-06 22:43:05 -0700
committerEthan Jackson <ethan@nicira.com>2011-10-11 16:48:41 -0700
commit86dc65011b820698dab5f1e4cb5083d20f14aad4 (patch)
tree90fc400ce5717409f5e2035ba1467d7e49972d6d /vswitchd/bridge.c
parent95b0fad8d144bb80b46f675e7541943b9e70d229 (diff)
cfm: New 'cfm_opstate' setting.
In some cases, a controller may want to take an interface down for forwarding purposes, but avoid completely deconfiguring CFM and thus lose all connectivity monitoring. The new 'cfm_opstate' setting is a way to achieve this behavior.
Diffstat (limited to 'vswitchd/bridge.c')
-rw-r--r--vswitchd/bridge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index de3ffba8..186f2501 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2668,7 +2668,7 @@ static void
iface_configure_cfm(struct iface *iface)
{
const struct ovsrec_interface *cfg = iface->cfg;
- const char *extended_str;
+ const char *extended_str, *opstate_str;
struct cfm_settings s;
if (!cfg->n_cfm_mpid) {
@@ -2687,6 +2687,9 @@ iface_configure_cfm(struct iface *iface)
"false");
s.extended = !strcasecmp("true", extended_str);
+ opstate_str = get_interface_other_config(iface->cfg, "cfm_opstate", "up");
+ s.opup = !strcasecmp("up", opstate_str);
+
ofproto_port_set_cfm(iface->port->bridge->ofproto, iface->ofp_port, &s);
}