]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: clean neighbors if an interface goes down
authorVincent Bernat <vincent@bernat.im>
Sat, 22 Aug 2015 21:09:42 +0000 (23:09 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 22 Aug 2015 21:09:42 +0000 (23:09 +0200)
As we don't delete down interfaces anymore, we must at least clear
neighbors correctly.

src/daemon/lldpd.c

index c47209de12f58e168415ece50f15e8d1079eeb0b..59fa4569f3b629f37a0298882d2ee471df7e95c1 100644 (file)
@@ -413,7 +413,8 @@ lldpd_cleanup(struct lldpd *cfg)
                        lldpd_remote_cleanup(hardware, notify_clients_deletion, 1);
                        lldpd_hardware_cleanup(cfg, hardware);
                } else
-                       lldpd_remote_cleanup(hardware, notify_clients_deletion, 0);
+                       lldpd_remote_cleanup(hardware, notify_clients_deletion,
+                           !(hardware->h_flags & IFF_RUNNING));
        }
 
        log_debug("localchassis", "cleanup all chassis");