The check added to process_upcall() for IPFIX and flow sample upcalls
returns EINVAL when odp_tun_key_from_attr() does not report
ODP_FIT_ERROR, i.e. when the output tunnel key was parsed successfully,
while a key that fails to parse is still used.
The output tunnel key is only provided by the kernel datapath, which
adds OVS_PACKET_ATTR_EGRESS_TUN_KEY to the upcall when the sampled
packet is sent to a tunnel port. As a result, every IPFIX sample of a
packet sent to a tunnel port is dropped instead of being exported.
The existing IPFIX tunnel tests run on the dummy datapath, which never
provides this key, so they do not cover this path.
Only bail out when the tunnel key cannot be parsed.
Fixes: d1bd62dae553 ("ofproto-dpif-upcall: Check odp_tun_key_from_attr() return
value.")
Signed-off-by: Salem Sol <[email protected]>
---
ofproto/ofproto-dpif-upcall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index c877a0c24d..b7929d8c07 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1563,7 +1563,7 @@ process_upcall(struct udpif *udpif, struct upcall *upcall,
if (upcall->out_tun_key) {
if (odp_tun_key_from_attr(upcall->out_tun_key,
&output_tunnel_key,
- NULL) != ODP_FIT_ERROR) {
+ NULL) == ODP_FIT_ERROR) {
return EINVAL;
}
}
--
2.43.7
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev