Skip to content

Commit 8eff0e0

Browse files
apconoledavem330
authored andcommitted
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: e52b07a ("selftests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 76035fd commit 8eff0e0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/testing/selftests/net/openvswitch/ovs-dpctl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,12 +1119,14 @@ class ovs_key_ct_tuple_ipv4(ovs_key_proto):
11191119
"src",
11201120
lambda x: str(ipaddress.IPv4Address(x)),
11211121
int,
1122+
convert_ipv4,
11221123
),
11231124
(
11241125
"dst",
11251126
"dst",
1126-
lambda x: str(ipaddress.IPv6Address(x)),
1127+
lambda x: str(ipaddress.IPv4Address(x)),
11271128
int,
1129+
convert_ipv4,
11281130
),
11291131
("tp_src", "tp_src", "%d", int),
11301132
("tp_dst", "tp_dst", "%d", int),

0 commit comments

Comments
 (0)