Skip to content

Commit

Permalink
Merge pull request #74 from westermo/silence-mrdisc
Browse files Browse the repository at this point in the history
mrdisc: Ignore send() error messages on link down
  • Loading branch information
troglobit authored Jun 7, 2017
2 parents 11b5438 + bb424f1 commit 9d6b55a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/mrdisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ static void announce(struct ifsock *entry)
return;

smclog(LOG_DEBUG, "Sending mrdisc announcement on %s", entry->ifname);
if (inet_send(entry->sd, IGMP_MRDISC_ANNOUNCE, interval))
smclog(LOG_WARNING, "Failed sending IGMP control message 0x%x on %s",
IGMP_MRDISC_ANNOUNCE, entry->ifname);
if (inet_send(entry->sd, IGMP_MRDISC_ANNOUNCE, interval)) {
if (ENETUNREACH == errno || ENETDOWN == errno)
return; /* Link down, ignore. */

smclog(LOG_WARNING, "Failed sending IGMP control message 0x%x on %s, error %d: %s",
IGMP_MRDISC_ANNOUNCE, entry->ifname, errno, strerror(errno));
}
}

int mrdisc_init(int period)
Expand Down

0 comments on commit 9d6b55a

Please sign in to comment.