From 683b171072390e9df205a9de1a98f53f3121eefd Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 27 Dec 2011 22:03:42 +0100 Subject: [PATCH] Don't send MFS equal to 0. --- src/lldp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lldp.c b/src/lldp.c index d5366915..31c6de46 100644 --- a/src/lldp.c +++ b/src/lldp.c @@ -227,13 +227,15 @@ lldp_send(struct lldpd *global, goto toobig; /* MFS */ - if (!( - POKE_START_LLDP_TLV(LLDP_TLV_ORG) && - POKE_BYTES(dot3, sizeof(dot3)) && - POKE_UINT8(LLDP_TLV_DOT3_MFS) && - POKE_UINT16(port->p_mfs) && - POKE_END_LLDP_TLV)) - goto toobig; + if (port->p_mfs) { + if (!( + POKE_START_LLDP_TLV(LLDP_TLV_ORG) && + POKE_BYTES(dot3, sizeof(dot3)) && + POKE_UINT8(LLDP_TLV_DOT3_MFS) && + POKE_UINT16(port->p_mfs) && + POKE_END_LLDP_TLV)) + goto toobig; + } /* Power */ if (port->p_power.devicetype) { if (!( -- 2.39.5