aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Conole <aconole@redhat.com>2023-10-11 15:49:39 -0400
committerDavid S. Miller <davem@davemloft.net>2023-10-15 20:02:51 +0100
commit8eff0e062201e26739c74ac2355b7362622b7190 (patch)
tree9828f3afd53cc76b161b146c441b5d03f2abf649
parent76035fd12cb9046be00ffb9d4262b5b3277d5068 (diff)
downloadlinux-8eff0e062201e26739c74ac2355b7362622b7190.tar.gz
selftests: openvswitch: Fix the ct_tuple for v4
The ct_tuple v4 data structure decode / encode routines were using the v6 IP address decode and relying on default encode. This could cause exceptions during encode / decode depending on how a ct4 tuple would appear in a netlink message. Caught during code review. Fixes: e52b07aa1a54 ("selftests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--tools/testing/selftests/net/openvswitch/ovs-dpctl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
index 10b8f31548f840..b97e621face958 100644
--- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
+++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
@@ -1119,12 +1119,14 @@ class ovskey(nla):
"src",
lambda x: str(ipaddress.IPv4Address(x)),
int,
+ convert_ipv4,
),
(
"dst",
"dst",
- lambda x: str(ipaddress.IPv6Address(x)),
+ lambda x: str(ipaddress.IPv4Address(x)),
int,
+ convert_ipv4,
),
("tp_src", "tp_src", "%d", int),
("tp_dst", "tp_dst", "%d", int),