From a700e935a122a38e9e907442f1933ba6ba6bd0fa Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 5 Dec 2008 12:17:39 +0100 Subject: [PATCH] Some equipments send empty TLV for optional TLV --- src/lldp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 " -- 2.39.5