]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Revert "lldp: skip empty LLDP-MED inventory TLV instead"
authorVincent Bernat <vincent@bernat.im>
Fri, 29 Jul 2016 20:31:02 +0000 (22:31 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 29 Jul 2016 20:31:02 +0000 (22:31 +0200)
This reverts commit aa357d2b6b54c966353bcee4d7f14640540a8cf2. The
previous behaviour was equivalent. Let's stick to that for now.

NEWS
src/daemon/protocols/lldp.c

diff --git a/NEWS b/NEWS
index 800fad8a15c65d019215947272ebda3c3ce68a7f..280299dbef3577061d6b65a602bd61222a3acf79 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,3 @@
-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 ebe00d846e5448e5482f27d0065da539dd724bbd..59b9f1c2161c19251ad7c7608fdd5109da8487a3 100644 (file)
@@ -1064,8 +1064,7 @@ 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)
-                                               /* Empty TLV, skip it */
-                                               break;
+                                               b = NULL;
                                        else {
                                                if ((b = (char*)malloc(tlv_size - 3)) ==
                                                    NULL) {