From e74dad8526cc72ced4554f9af16464a00b230eec Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 16 Jun 2020 23:21:53 +0200 Subject: Some minor fixes to igmp --- igmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/igmp.c b/igmp.c index 14ba516..784ed2f 100644 --- a/igmp.c +++ b/igmp.c @@ -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; } -- cgit v1.2.3