Fix bug in clearing unsupported switch flags.
[openvswitch] / switch / datapath.c
index 13d06ff1d3c07a12352efa0686a82b8c31c5125d..4d52dda93c538755da8785c9ee928742d23cb0d1 100644 (file)
@@ -985,7 +985,7 @@ recv_set_config(struct datapath *dp, const struct sender *sender UNUSED,
     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;