]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Don't send MFS equal to 0.
authorVincent Bernat <bernat@luffy.cx>
Tue, 27 Dec 2011 21:03:42 +0000 (22:03 +0100)
committerVincent Bernat <bernat@luffy.cx>
Tue, 27 Dec 2011 21:03:42 +0000 (22:03 +0100)
src/lldp.c

index d5366915a2889e8b590de24265e9c3d72ff582c8..31c6de46e253ca68877b6a36ff85e3a7509940f4 100644 (file)
@@ -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 (!(