From: Vincent Bernat Date: Fri, 29 Jul 2016 20:31:02 +0000 (+0200) Subject: Revert "lldp: skip empty LLDP-MED inventory TLV instead" X-Git-Tag: 0.9.5~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ecdbc5318a399a0692db1f842a298ebbd3d20fd;p=thirdparty%2Flldpd.git Revert "lldp: skip empty LLDP-MED inventory TLV instead" This reverts commit aa357d2b6b54c966353bcee4d7f14640540a8cf2. The previous behaviour was equivalent. Let's stick to that for now. --- diff --git a/NEWS b/NEWS index 800fad8a..280299db 100644 --- 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. diff --git a/src/daemon/protocols/lldp.c b/src/daemon/protocols/lldp.c index ebe00d84..59b9f1c2 100644 --- a/src/daemon/protocols/lldp.c +++ b/src/daemon/protocols/lldp.c @@ -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) {