]> git.ipfire.org Git - thirdparty/lldpd.git/blobdiff - src/daemon/event.c
lldp: attach remote TTL to port instead of chassis
[thirdparty/lldpd.git] / src / daemon / event.c
index abcdaf33626ce4649996f8d4b27fec395ce616f7..bf12879ebf0c8a3ce1e2da0d1e562b28df572f75 100644 (file)
@@ -804,16 +804,16 @@ levent_schedule_cleanup(struct lldpd *cfg)
        struct lldpd_port *port;
        TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries) {
                TAILQ_FOREACH(port, &hardware->h_rports, p_entries) {
-                       if (now >= port->p_lastupdate + port->p_chassis->c_ttl) {
+                       if (now >= port->p_lastupdate + port->p_ttl) {
                                tv.tv_sec = 0;
                                log_debug("event", "immediate cleanup on port %s (%lld, %d, %lld)",
                                    hardware->h_ifname,
                                    (long long)now,
-                                   port->p_chassis->c_ttl,
+                                   port->p_ttl,
                                    (long long)port->p_lastupdate);
                                break;
                        }
-                       next = port->p_chassis->c_ttl - (now - port->p_lastupdate);
+                       next = port->p_ttl - (now - port->p_lastupdate);
                        if (next < tv.tv_sec)
                                tv.tv_sec = next;
                }