From: Vincent Bernat Date: Fri, 5 Dec 2008 11:17:39 +0000 (+0100) Subject: Some equipments send empty TLV for optional TLV X-Git-Tag: 0.3~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a700e935a122a38e9e907442f1933ba6ba6bd0fa;p=thirdparty%2Flldpd.git Some equipments send empty TLV for optional TLV --- diff --git a/src/lldp.c b/src/lldp.c index ff1dceb9..bd36c137 100644 --- a/src/lldp.c +++ b/src/lldp.c @@ -470,9 +470,9 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, case LLDP_TLV_SYSTEM_NAME: case LLDP_TLV_SYSTEM_DESCR: if (size < 1) { - LLOG_WARNX("tlv string too short received on %s", + LLOG_DEBUG("empty tlv received on %s", hardware->h_ifname); - goto malformed; + break; } if ((b = (char *)calloc(1, size + 1)) == NULL) { LLOG_WARN("unable to allocate memory for string tlv "