]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldp: skip empty LLDP-MED inventory TLV instead
authorVincent Bernat <vincent@bernat.im>
Fri, 29 Jul 2016 20:10:21 +0000 (22:10 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 29 Jul 2016 20:11:40 +0000 (22:11 +0200)
NEWS
src/daemon/protocols/lldp.c

diff --git a/NEWS b/NEWS
index 280299dbef3577061d6b65a602bd61222a3acf79..800fad8a15c65d019215947272ebda3c3ce68a7f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+lldpd (0.9.5):
+  * Fix:
+    + Skip empty LLDP-MED inventory TLV.
+
 lldpd (0.9.4)
   * Change:
     + Make lldpd accepts a `-p` option to specify the PID file.
index 59b9f1c2161c19251ad7c7608fdd5109da8487a3..ebe00d846e5448e5482f27d0065da539dd724bbd 100644 (file)
@@ -1064,7 +1064,8 @@ lldp_decode(struct lldpd *cfg, char *frame, int s,
                                case LLDP_TLV_MED_IV_MODEL:
                                case LLDP_TLV_MED_IV_ASSET:
                                        if (tlv_size <= 4)
-                                               b = NULL;
+                                               /* Empty TLV, skip it */
+                                               break;
                                        else {
                                                if ((b = (char*)malloc(tlv_size - 3)) ==
                                                    NULL) {