diff options
-rw-r--r-- | igmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -501,10 +501,10 @@ igmp_init(struct cfg *cfg) */ sfd = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_ALL)); if (sfd < 0) { - if (errno == EACCES) - verbose("igmp socket: permission denied\n"); + if (errno == EACCES || errno == EPERM) + verbose("permission denied\n"); else - error("igmp socket: %m"); + error("socket: %m (%i)\n", errno); goto out_free; } @@ -543,7 +543,7 @@ igmp_init(struct cfg *cfg) /* can't set .sll_protocol to htons(ETH_P_IP), see comment above */ if (bind(sfd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - error("bind: %m"); + error("bind: %m\n"); goto out_fd; } |