From 314ca2736599323f90201ec1db1d565006abe750 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 21 Nov 2019 20:13:38 +0100 Subject: [PATCH] lldp: don't discard the whole LLDPDU when only one TLV is invalid IEEE802.1AB-2005 says: > If TLV_type_value is in the range of reserved TLV types in Table > 9-1, the TLV is unrecognized and may be a basic TLV from a later > LLDP version. The statsTLVsUnrecognizedTotal counter shall be > incremented, and the TLV shall be assumed to be validated. Fix #323 --- src/daemon/protocols/lldp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/protocols/lldp.c b/src/daemon/protocols/lldp.c index 2609d6d4..a6705038 100644 --- a/src/daemon/protocols/lldp.c +++ b/src/daemon/protocols/lldp.c @@ -1253,7 +1253,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, log_warnx("lldp", "unknown tlv (%d) received on %s", tlv_type, hardware->h_ifname); hardware->h_rx_unrecognized_cnt++; - goto malformed; + break; } if (pos > tlv + tlv_size) { log_warnx("lldp", "BUG: already past TLV!"); -- 2.39.5