diff options
author | Aaron Conole <aconole@redhat.com> | 2023-10-11 21:49:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-15 21:02:51 +0200 |
commit | 8eff0e062201e26739c74ac2355b7362622b7190 (patch) | |
tree | 9828f3afd53cc76b161b146c441b5d03f2abf649 /tools/testing | |
parent | selftests: openvswitch: Skip drop testing on older kernels (diff) | |
download | linux-8eff0e062201e26739c74ac2355b7362622b7190.tar.xz linux-8eff0e062201e26739c74ac2355b7362622b7190.zip |
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>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 4 |
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 10b8f31548f8..b97e621face9 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), |