]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
OpenBSD: Don't spam syslog when cannot send NA
authorRoy Marples <roy@marples.name>
Fri, 26 Apr 2019 10:38:45 +0000 (11:38 +0100)
committerRoy Marples <roy@marples.name>
Fri, 26 Apr 2019 10:38:45 +0000 (11:38 +0100)
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.

src/ipv6nd.c

index 076f18646753af75c7dbc38bbb931e6b45063bf8..08b850e954b1b2e7a75b70e11449d5f609fe6dcd 100644 (file)
@@ -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,