From 8271a2ed57331f211c781bb551efe52e380902ae Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 11 Aug 2023 15:12:25 +1000 Subject: epoll: Tiny cleanup to udp_sock_handler() Move the test for c->no_udp into the function itself, rather than in the dispatching switch statement to better localize the UDP specific logic, and make for greated consistency with other handler functions. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- passt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'passt.c') diff --git a/passt.c b/passt.c index aa9ba8a..2d674bf 100644 --- a/passt.c +++ b/passt.c @@ -325,8 +325,7 @@ loop: tcp_sock_handler(&c, ref, eventmask, &now); break; case EPOLL_TYPE_UDP: - if (!c.no_udp) - udp_sock_handler(&c, ref, eventmask, &now); + udp_sock_handler(&c, ref, eventmask, &now); break; case EPOLL_TYPE_ICMP: icmp_sock_handler(&c, ref); -- cgit v1.2.3