From: Vincent Bernat Date: Sat, 22 Aug 2015 21:27:14 +0000 (+0200) Subject: lldpd: ensure retransmit is triggered when a port goes up X-Git-Tag: 0.8.0~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=196757ce72380b6af850e16782c09bb79749fc44;p=thirdparty%2Flldpd.git lldpd: ensure retransmit is triggered when a port goes up --- diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index c4f8c6fe..935b9c0a 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -356,6 +356,8 @@ lldpd_reset_timer(struct lldpd *cfg) * change. To do this, we zero out fields that are not * significant, marshal the port, then restore. */ struct lldpd_port *port = &hardware->h_lport; + /* Take the current flags into account to detect a change. */ + port->_p_hardware_flags = hardware->h_flags; u_int8_t *output = NULL; ssize_t output_len; char save[LLDPD_PORT_START_MARKER]; diff --git a/src/lldpd-structs.h b/src/lldpd-structs.h index a96801ab..27779b40 100644 --- a/src/lldpd-structs.h +++ b/src/lldpd-structs.h @@ -246,6 +246,7 @@ struct lldpd_port { /* Important: all fields that should be ignored to check if a port has * been changed should be before this mark. */ #define LLDPD_PORT_START_MARKER (offsetof(struct lldpd_port, p_id_subtype)) + int _p_hardware_flags; /* This is a copy of hardware flags. Do not use it! */ u_int8_t p_id_subtype; char *p_id; int p_id_len;