summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--igmp.c8
1 files 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;
}