When lldp_decode() encounters an unrecognized TLV type, it jumps to the malformed label, discarding the entire frame including all valid TLVs already parsed.
IEEE 802.1AB-2005 (Table 9-1) says that TLVs with types in the reserved range should be accepted because they may come from a newer LLDP version. The statsTLVsUnrecognizedTotal counter should be incremented and the TLV should be considered validated. Replace "goto malformed" with "break" to skip the unrecognized TLV and continue parsing the rest of the frame. Upstream: https://github.com/lldpd/lldpd/commit/314ca27 Signed-off-by: Timothy Redaelli <[email protected]> --- lib/lldp/lldp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lldp/lldp.c b/lib/lldp/lldp.c index 95aa130d5..272971957 100644 --- a/lib/lldp/lldp.c +++ b/lib/lldp/lldp.c @@ -691,7 +691,7 @@ lldp_decode(struct lldpd *cfg OVS_UNUSED, char *frame, int s, tlv_type, hardware->h_ifname); hardware->h_rx_unrecognized_cnt++; - goto malformed; + break; } if (pos > tlv + tlv_size) { VLOG_WARN("BUG: already past TLV!"); -- 2.54.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
