]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
inet6: Only log RA's when they are from a new server
authorRoy Marples <roy@marples.name>
Fri, 17 Apr 2020 12:22:54 +0000 (13:22 +0100)
committerRoy Marples <roy@marples.name>
Fri, 17 Apr 2020 12:22:54 +0000 (13:22 +0100)
We cannot log them normally as there are implementations which
vary the expiry times based on their own times so each message is
different. As such, we only log from new servers or coming back
from expiration.

src/ipv6nd.c

index 7ce34001c21b78227e86ca1913741651d340faa1..6f5ce35b24196c00e64ba0effd7b8798d8336610 100644 (file)
@@ -1169,7 +1169,8 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
         * much needless log spam. */
        if (rap->willexpire)
                new_data = true;
-       loglevel = new_data || !rap->isreachable ? LOG_INFO : LOG_DEBUG,
+       loglevel = new_rap || rap->willexpire || !rap->isreachable ?
+           LOG_INFO : LOG_DEBUG,
        logmessage(loglevel, "%s: Router Advertisement from %s",
            ifp->name, rap->sfrom);