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: e52b07aa1a
("selftests: openvswitch: add flow dump support")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
76035fd12c
commit
8eff0e0622
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue