From: Ben Pfaff Date: Mon, 16 Mar 2009 17:05:52 +0000 (-0700) Subject: secchan: Only let the controller connection set configuration flags. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a685cb31255f0f87cfa8fb75a1a1062ceceaa23;p=openvswitch secchan: Only let the controller connection set configuration flags. Each OpenFlow connection to secchan, both controller connection and management connections, is allowed to set its own miss_send_len and send_flow_exp configuration, because these are really per-connection state, not global state. But management connection should not change the global state (currently, just the treatment of fragments) when they do this. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index 2bd2633e..f3dce191 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -1399,17 +1399,19 @@ handle_set_config(struct ofproto *p, struct ofconn *ofconn, ofconn->send_flow_exp = (flags & OFPC_SEND_FLOW_EXP) != 0; - switch (flags & OFPC_FRAG_MASK) { - case OFPC_FRAG_NORMAL: - dpif_set_drop_frags(&p->dpif, false); - break; - case OFPC_FRAG_DROP: - dpif_set_drop_frags(&p->dpif, true); - break; - default: - VLOG_WARN_RL(&rl, "requested bad fragment mode (flags=%"PRIx16")", - osc->flags); - break; + if (ofconn == p->controller) { + switch (flags & OFPC_FRAG_MASK) { + case OFPC_FRAG_NORMAL: + dpif_set_drop_frags(&p->dpif, false); + break; + case OFPC_FRAG_DROP: + dpif_set_drop_frags(&p->dpif, true); + break; + default: + VLOG_WARN_RL(&rl, "requested bad fragment mode (flags=%"PRIx16")", + osc->flags); + break; + } } if ((ntohs(osc->miss_send_len) != 0) != (ofconn->miss_send_len != 0)) {