summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorAnsis Atteka <aatteka@ovn.org>2016-07-21 04:49:40 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-07-21 06:20:01 -0700
commitf574ff4aa9abaea9f8aa41cff3f82dd2b7a8c054 (patch)
tree314996748d40f4856fa13ad2f3478fdea6152696 /ofproto/tunnel.c
parentca3574d552b2011859f9d72dd3f08353603b8213 (diff)
downloadopenvswitch-f574ff4aa9abaea9f8aa41cff3f82dd2b7a8c054.tar.gz
tunneling: get skb marking to work properly with tunnels
There are two issues that this patch fixes: 1. it was impossible to set skb mark at all through NXM_NX_PKT_MARK register for tunnel packets; AND 2. ipsec_xxx tunnels would not be marked with the default IPsec mark (broken by d23df9a87 "lib/odp: Use masked set actions."). This patch also adds anti-regression tests to prevent such breakages in the future. Signed-off-by: Ansis Atteka <aatteka@ovn.org> VMware-BZ: #1653178 Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r--ofproto/tunnel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index 9695c54e0..85a485cd2 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -435,7 +435,8 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow,
flow->tunnel.ipv6_dst = in6addr_any;
}
}
- flow->pkt_mark = tnl_port->match.pkt_mark;
+ flow->pkt_mark |= tnl_port->match.pkt_mark;
+ wc->masks.pkt_mark |= tnl_port->match.pkt_mark;
if (!cfg->out_key_flow) {
flow->tunnel.tun_id = cfg->out_key;