Nit: On Thu, 24 Nov 2022 12:16:56 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:udp_sock_handler_splice() has a somewhat clunky if to extract the port from a socket address which could be either IPv4 or IPv6. Future changes are going to make this even more clunky, so introduce a helper function to do this extraction. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- udp.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/udp.c b/udp.c index 1db55e5..a79e5ca 100644 --- a/udp.c +++ b/udp.c @@ -498,6 +498,19 @@ static int udp_splice_new_ns(void *arg) return 0; } +/** + * sa_port() - Determine port from a sockaddr_in or sockaddr_in6 + * @v6: Is @sa a sockaddr_in6 (otherwise sockaddr_in)Missing '?' -- Stefano