mirror of
https://passt.top/passt
synced 2024-12-22 21:55:22 +00:00
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
05f606ab0b
commit
8271a2ed57
3
passt.c
3
passt.c
@ -325,8 +325,7 @@ loop:
|
|||||||
tcp_sock_handler(&c, ref, eventmask, &now);
|
tcp_sock_handler(&c, ref, eventmask, &now);
|
||||||
break;
|
break;
|
||||||
case EPOLL_TYPE_UDP:
|
case EPOLL_TYPE_UDP:
|
||||||
if (!c.no_udp)
|
udp_sock_handler(&c, ref, eventmask, &now);
|
||||||
udp_sock_handler(&c, ref, eventmask, &now);
|
|
||||||
break;
|
break;
|
||||||
case EPOLL_TYPE_ICMP:
|
case EPOLL_TYPE_ICMP:
|
||||||
icmp_sock_handler(&c, ref);
|
icmp_sock_handler(&c, ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user