mirror of
https://github.com/openvswitch/ovs
synced 2025-10-13 14:07:02 +00:00
dpif-netdev: Free packets on TUNNEL_PUSH if should_steal.
Unconditional return may cause packet leak in case of
'should_steal == true'.
Additionally, removed redundant checking for depth level.
CC: Sugesh Chandran <sugesh.chandran@intel.com>
Fixes: 7c12dfc527
("tunneling: Avoid datapath-recirc by
combining recirc actions at xlate.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ian Stokess <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
7bbc2e1def
commit
47e1b3b625
@@ -5674,12 +5674,16 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OVS_ACTION_ATTR_TUNNEL_PUSH:
|
case OVS_ACTION_ATTR_TUNNEL_PUSH:
|
||||||
if (*depth < MAX_RECIRC_DEPTH) {
|
if (should_steal) {
|
||||||
dp_packet_batch_apply_cutlen(packets_);
|
/* We're requested to push tunnel header, but also we need to take
|
||||||
push_tnl_action(pmd, a, packets_);
|
* the ownership of these packets. Thus, we can avoid performing
|
||||||
return;
|
* the action, because the caller will not use the result anyway.
|
||||||
|
* Just break to free the batch. */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
dp_packet_batch_apply_cutlen(packets_);
|
||||||
|
push_tnl_action(pmd, a, packets_);
|
||||||
|
return;
|
||||||
|
|
||||||
case OVS_ACTION_ATTR_TUNNEL_POP:
|
case OVS_ACTION_ATTR_TUNNEL_POP:
|
||||||
if (*depth < MAX_RECIRC_DEPTH) {
|
if (*depth < MAX_RECIRC_DEPTH) {
|
||||||
|
Reference in New Issue
Block a user