]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldp: increase statsTLVsUnrecognizedTotal on unknown TLV
authorVincent Bernat <vincent@bernat.ch>
Sat, 6 Apr 2019 19:17:25 +0000 (21:17 +0200)
committerVincent Bernat <vincent@bernat.ch>
Sat, 6 Apr 2019 19:17:25 +0000 (21:17 +0200)
This was done for organization TLVs, but not for other TLVs.

Fix #323.

src/daemon/protocols/lldp.c

index aae338d849ec294a5041f3421c3d2e894fc03658..54c2b4a87e19f8c371b33818d93929cf93aacf01 100644 (file)
@@ -1147,6 +1147,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s,
                default:
                        log_warnx("lldp", "unknown tlv (%d) received on %s",
                            tlv_type, hardware->h_ifname);
+                       hardware->h_rx_unrecognized_cnt++;
                        goto malformed;
                }
                if (pos > tlv + tlv_size) {