aboutgitcodebugslistschat
path: root/test
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-24 19:54:19 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-12-06 07:42:16 +0100
commitd5338070275c26c0d60120b8b765e8fb4c19264e (patch)
tree7a1610e8df22e7bf12d9893084b6bbd69bb154f5 /test
parent6af7ee74cf8baca069ae948e70e62eae24c1f93b (diff)
downloadpasst-d5338070275c26c0d60120b8b765e8fb4c19264e.tar
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.tar.gz
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.tar.bz2
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.tar.lz
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.tar.xz
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.tar.zst
passt-d5338070275c26c0d60120b8b765e8fb4c19264e.zip
udp: Better factor IPv4 and IPv6 paths in udp_sock_handler()
Apart from which mh array they're operating on the recvmmsg() calls in udp_sock_handler() are identical between the IPv4 and IPv6 paths, as are some of the control structure updates. By using some local variables to refer to the IP version specific control arrays, make some more logic common between the IPv4 and IPv6 paths. As well as slightly reducing the code size, this makes it less likely that we'll accidentally use the IPv4 arrays in the IPv6 path or vice versa as we did in a recently fixed bug. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions