From cb85b49c4b7e610ccea2b03b9d62184f6247f4ba Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 22 Oct 2014 14:57:39 -0700 Subject: [PATCH] tunnel: Add to nw_tos bits instead of replacing them in tnl_port_send(). 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 Acked-by: Justin Pettit --- ofproto/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 46b071921..a9eecffb7 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -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; -- 2.20.1