From: Vincent Bernat Date: Thu, 1 Oct 2009 18:59:04 +0000 (+0200) Subject: Reset "sent" flag for each port when sending. X-Git-Tag: 0.5.0~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d86e62fcff0e7b7466a6438dad10e0d423aeba3;p=thirdparty%2Flldpd.git Reset "sent" flag for each port when sending. On ports not receiving anything, we send an LLDP packet only on the first running port. Others get ignored. We reset "sent" flag to 0 for each port. --- diff --git a/src/lldpd.c b/src/lldpd.c index 0d669a59..14b07d2d 100644 --- a/src/lldpd.c +++ b/src/lldpd.c @@ -542,7 +542,7 @@ lldpd_send_all(struct lldpd *cfg) { struct lldpd_hardware *hardware; struct lldpd_port *port; - int i, sent = 0; + int i, sent; cfg->g_lastsent = time(NULL); TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries) { @@ -550,6 +550,7 @@ lldpd_send_all(struct lldpd *cfg) if ((hardware->h_flags & IFF_RUNNING) == 0) continue; + sent = 0; for (i=0; cfg->g_protocols[i].mode != 0; i++) { if (!cfg->g_protocols[i].enabled) continue;