summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2015-01-01 20:28:27 +0000
committerflorian <florian@openbsd.org>2015-01-01 20:28:27 +0000
commite05394afb3c68a2c7bd9b935a427a7e116e72a54 (patch)
tree398eb2209e3ad8ee0765cb3f0695c96402734102
parentTest that syslogd sending over TCP does not leak a file descriptor (diff)
downloadwireguard-openbsd-e05394afb3c68a2c7bd9b935a427a7e116e72a54.tar.xz
wireguard-openbsd-e05394afb3c68a2c7bd9b935a427a7e116e72a54.zip
"The logging of errors SHOULD be restricted to conflicting information
that causes hosts to switch from one value to another with each received advertisement." (RFC 4861) Receiving of RAs on non-advertising interfaces is not a conflicting information; don't log it. "Mike." (the.lists AT mgm51 DOT com) reported that this leads to excessive logging with certain cable providers in 2013. Recently reported again by Aaron Riekenberg (aaron.riekenberg AT gmail DOT com). Thanks! OK bluhm@
-rw-r--r--usr.sbin/rtadvd/rtadvd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 8c702976de4..7fa6180caad 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtadvd.c,v 1.51 2015/01/01 16:31:59 florian Exp $ */
+/* $OpenBSD: rtadvd.c,v 1.52 2015/01/01 20:28:27 florian Exp $ */
/* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */
/*
@@ -810,13 +810,9 @@ ra_input(int len, struct nd_router_advert *ra,
/*
* RA consistency check according to RFC-2461 6.2.7
*/
- if ((rai = if_indextorainfo(pi->ipi6_ifindex)) == 0) {
- log_info("received RA from %s on non-advertising interface(%s)",
- inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
- INET6_ADDRSTRLEN),
- if_indextoname(pi->ipi6_ifindex, ifnamebuf));
- goto done;
- }
+ if ((rai = if_indextorainfo(pi->ipi6_ifindex)) == NULL)
+ goto done; /* not our interface */
+
rai->rainput++; /* increment statistics */
/* Cur Hop Limit value */