From: Roy Marples Date: Fri, 26 Apr 2019 10:38:45 +0000 (+0100) Subject: OpenBSD: Don't spam syslog when cannot send NA X-Git-Tag: v7.2.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcc399eeb7bea265b285825f6b7b3b59e7796f43;p=thirdparty%2Fdhcpcd.git OpenBSD: Don't spam syslog when cannot send NA The error is "No route to host". OpenBSD does not support IPv6 address sharing, so it's no biggie. As such, only log an error when debugging. --- diff --git a/src/ipv6nd.c b/src/ipv6nd.c index 076f1864..08b850e9 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -431,7 +431,6 @@ ipv6nd_sendadvertisement(void *arg) cm->cmsg_type = IPV6_PKTINFO; cm->cmsg_len = CMSG_LEN(sizeof(pi)); memcpy(CMSG_DATA(cm), &pi, sizeof(pi)); - logdebugx("%s: sending NA for %s", ifp->name, ia->saddr); #ifdef __sun s = state->nd_fd; @@ -439,7 +438,13 @@ ipv6nd_sendadvertisement(void *arg) s = ctx->nd_fd; #endif if (sendmsg(s, &msg, 0) == -1) +#ifdef __OpenBSD__ +/* This isn't too critical as they don't support IPv6 address sharing */ +#warning Cannot send NA messages on OpenBSD + logdebug(__func__); +#else logerr(__func__); +#endif if (++ia->na_count < MAX_NEIGHBOR_ADVERTISEMENT) { eloop_timeout_add_sec(ctx->eloop,