From: Vincent Bernat Date: Tue, 27 Dec 2011 21:03:42 +0000 (+0100) Subject: Don't send MFS equal to 0. X-Git-Tag: 0.5.6~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=683b171072390e9df205a9de1a98f53f3121eefd;p=thirdparty%2Flldpd.git Don't send MFS equal to 0. --- 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 (!(