Fix bug in clearing unsupported switch flags.
[openvswitch] / datapath / forward.c
index 318cfb3c43cd89817cd38f8d262dbdb99be3b96a..524ee14f3aafe0c2add19c514fb62808dc855ec4 100644 (file)
@@ -308,7 +308,7 @@ recv_set_config(struct sw_chain *chain, const struct sender *sender,
        const struct ofp_switch_config *osc = msg;
        int flags;
 
-       flags = ntohs(osc->flags) & ~(OFPC_SEND_FLOW_EXP | OFPC_FRAG_MASK);
+       flags = ntohs(osc->flags) & (OFPC_SEND_FLOW_EXP | OFPC_FRAG_MASK);
        if ((flags & OFPC_FRAG_MASK) != OFPC_FRAG_NORMAL
            && (flags & OFPC_FRAG_MASK) != OFPC_FRAG_DROP) {
                flags = (flags & ~OFPC_FRAG_MASK) | OFPC_FRAG_DROP;