summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-04-17 13:22:54 +0100
committerRoy Marples <roy@marples.name>2020-04-17 13:22:54 +0100
commit326388860ee14f6ab2a511be6187e03e257c787f (patch)
tree87e50fac47f0e2e379eef70f263ddf441ac208d2 /src/ipv6nd.c
parent023d14bec128f9031ec694c7a84fcabeedb68366 (diff)
downloaddhcpcd-326388860ee14f6ab2a511be6187e03e257c787f.tar.xz
inet6: Only log RA's when they are from a new server
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.
Diffstat (limited to 'src/ipv6nd.c')
-rw-r--r--src/ipv6nd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index 7ce34001..6f5ce35b 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -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);