From e05394afb3c68a2c7bd9b935a427a7e116e72a54 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 1 Jan 2015 20:28:27 +0000 Subject: [PATCH] "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@ --- usr.sbin/rtadvd/rtadvd.c | 12 ++++-------- 1 file 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 */ -- 2.20.1