Skip to content

Commit 36bf5cc

Browse files
committed
openvswitch: Reset tunnel key between input and output.
It doesn't make sense to output a tunnel packet using the same parameters that it was received with since that will generally just result in the packet going back to us. As a result, userspace assumes that the tunnel key is cleared when transitioning through the switch. In the majority of cases this doesn't matter since a packet is either going to a tunnel port (in which the key is overwritten with new values) or to a non-tunnel port (in which case the key is ignored). However, it's theoreticaly possible that userspace could rely on the documented behavior, so this corrects it. Signed-off-by: Jesse Gross <[email protected]>
1 parent 42415c9 commit 36bf5cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/openvswitch/actions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb)
535535
{
536536
struct sw_flow_actions *acts = rcu_dereference(OVS_CB(skb)->flow->sf_acts);
537537

538+
OVS_CB(skb)->tun_key = NULL;
538539
return do_execute_actions(dp, skb, acts->actions,
539540
acts->actions_len, false);
540541
}

0 commit comments

Comments
 (0)