]> git.proxmox.com Git - ovs.git/commitdiff
tunnel: Add to nw_tos bits instead of replacing them in tnl_port_send().
authorBen Pfaff <blp@nicira.com>
Wed, 22 Oct 2014 21:57:39 +0000 (14:57 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 23 Oct 2014 15:27:50 +0000 (08:27 -0700)
We normally only add 1-bits to wc->masks for datapath flow matching
purposes, never removing them.  In this case, the bits that get set to
zero will be set back to 1 later on in the function, so this does not fix
any actual bug, but the principle of only setting to 1, not to 0, seems
sound to me.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ofproto/tunnel.c

index 46b071921a253f9b4e4519866ce7139fcdad6d26..a9eecffb7eac9dea0c507bad7bbb54e0dd338d12 100644 (file)
@@ -405,7 +405,7 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow,
     }
 
     if (cfg->tos_inherit && is_ip_any(flow)) {
-        wc->masks.nw_tos = IP_DSCP_MASK;
+        wc->masks.nw_tos |= IP_DSCP_MASK;
         flow->tunnel.ip_tos = flow->nw_tos & IP_DSCP_MASK;
     } else {
         flow->tunnel.ip_tos = cfg->tos;