summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-04-26 11:38:45 +0100
committerRoy Marples <roy@marples.name>2019-04-26 11:38:45 +0100
commitfcc399eeb7bea265b285825f6b7b3b59e7796f43 (patch)
tree11089581c37c7dae7f9dc61b9b43712e5d1a8aa4
parent8347b7d63959b232657214e77ea74448f3d21f87 (diff)
downloaddhcpcd-fcc399eeb7bea265b285825f6b7b3b59e7796f43.tar.xz
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.
-rw-r--r--src/ipv6nd.c7
1 files changed, 6 insertions, 1 deletions
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,