]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
netlink: ignore IPv6 temporary addresses
authorVincent Bernat <vincent@bernat.ch>
Wed, 6 Jul 2022 20:56:29 +0000 (22:56 +0200)
committerVincent Bernat <vincent@bernat.ch>
Wed, 6 Jul 2022 20:57:07 +0000 (22:57 +0200)
NEWS
src/daemon/netlink.c

diff --git a/NEWS b/NEWS
index 7ac489945e321befdb42453d5402c3a78d065260..1380b0c4aeefba2c8b8c0da20cefd2c1799cb9b8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 lldpd (1.0.15)
  * Fix:
    + Really don't send VLANs when there are too many (#520)
+   + Ignore temporary IPv6 addresses (#521)
 
 lldpd (1.0.14)
  * Changes
index 1e6013af42382e2178932652747fb90db30952e6..93bcb53e61d062ee083ff841d8aa95ff272e0522 100644 (file)
@@ -684,7 +684,12 @@ retry:
                                        goto end;
                                }
                                if (netlink_parse_address(msg, ifanew) == 0) {
-                                       TAILQ_FOREACH(ifaold, ifas, next) {
+                                       if (ifanew->address.ss_family == AF_INET6 &&
+                                           ifanew->flags & IFA_F_TEMPORARY) {
+                                               interfaces_free_address(ifanew);
+                                               break;
+                                       }
+                                        TAILQ_FOREACH(ifaold, ifas, next) {
                                                if ((ifaold->index == ifanew->index) &&
                                                    !memcmp(&ifaold->address, &ifanew->address,
                                                        sizeof(ifaold->address))) break;