X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Ftunnel.c;h=1a39aeac31e2f256fe94fcb2a68cb490a6ca70f2;hb=abcd4402fec44a473a19cc790a9a3f00444a123f;hp=dedfca89257a1ebc8beaa0f9d71c0adfb5c8197a;hpb=be3f512a79ab7afb02a3b2cfbd51e10e0f5a5c55;p=sliver-openvswitch.git diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index dedfca892..1a39aeac3 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -253,11 +253,14 @@ tnl_port_send(const struct tnl_port *tnl_port, struct flow *flow, wc->masks.nw_tos = 0xff; flow->tunnel.ip_tos = flow->nw_tos & IP_DSCP_MASK; } else { - /* ECN fields are always inherited. */ - wc->masks.nw_tos |= IP_ECN_MASK; flow->tunnel.ip_tos = cfg->tos; } + /* ECN fields are always inherited. */ + if (is_ip_any(flow)) { + wc->masks.nw_tos |= IP_ECN_MASK; + } + if ((flow->nw_tos & IP_ECN_MASK) == IP_ECN_CE) { flow->tunnel.ip_tos |= IP_ECN_ECT_0; } else {