diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-16 23:21:53 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-16 23:21:53 +0200 |
commit | e74dad8526cc72ced4554f9af16464a00b230eec (patch) | |
tree | 0608f829a39fed1136090483a6c01cbdcb806f10 | |
parent | 5267074938565976b105324ded8a8c5982bb8d5a (diff) |
Some minor fixes to igmp
-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; } |