git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tunnel: Only un-wildcard the ECN bits for IP traffic.
[sliver-openvswitch.git]
/
ofproto
/
tunnel.c
diff --git
a/ofproto/tunnel.c
b/ofproto/tunnel.c
index
dedfca8
..
1a39aea
100644
(file)
--- 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 {
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;
}
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 {
if ((flow->nw_tos & IP_ECN_MASK) == IP_ECN_CE) {
flow->tunnel.ip_tos |= IP_ECN_ECT_0;
} else {