changeset 4484:0f490b4cde2a draft

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.
author Roy Marples <roy@marples.name>
date Fri, 26 Apr 2019 11:38:45 +0100
parents e2f5a58c978a
children 9ba7f650a8f7 ecc12563d4ad
files src/ipv6nd.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ipv6nd.c	Fri Apr 26 11:27:25 2019 +0100
+++ b/src/ipv6nd.c	Fri Apr 26 11:38:45 2019 +0100
@@ -431,7 +431,6 @@
 	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 @@
 	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,