diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -17,7 +17,6 @@ #include <arpa/inet.h> #include <net/ethernet.h> #include <net/if.h> -#include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> #include <sys/epoll.h> @@ -207,6 +206,9 @@ int sock_l4(struct ctx *c, int af, uint16_t proto, uint16_t port) if (proto == IPPROTO_UDP && PORT_IS_EPHEMERAL(port)) goto epoll_add; + if (proto == IPPROTO_ICMP || proto == IPPROTO_ICMPV6) + goto epoll_add; + if (bind(fd, sa, sl) < 0) { /* We'll fail to bind to low ports if we don't have enough * capabilities, and we'll fail to bind on already bound ports, |