cfm: New 'cfm_opstate' setting.
[sliver-openvswitch.git] / vswitchd / bridge.c
index de3ffba..186f250 100644 (file)
@@ -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);
 }