From: Vincent Bernat Date: Tue, 7 Nov 2023 07:17:29 +0000 (+0100) Subject: daemon/lldp: fix warning message about out of order TLVs X-Git-Tag: 1.0.18~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8317658710e9f8e454319b7383177b81bf9ec19c;p=thirdparty%2Flldpd.git daemon/lldp: fix warning message about out of order TLVs Fix #616 --- diff --git a/src/daemon/protocols/lldp.c b/src/daemon/protocols/lldp.c index 64d34473..6e732373 100644 --- a/src/daemon/protocols/lldp.c +++ b/src/daemon/protocols/lldp.c @@ -664,24 +664,24 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardwa case LLDP_TLV_CHASSIS_ID: if (tlv_count != 1) { log_warnx("lldp", - "first TLV should be a chassis ID on %s, not %d", - hardware->h_ifname, tlv_type); + "Chassis ID TLV should be first on %s, but it is on position %d", + hardware->h_ifname, tlv_count); goto malformed; } break; case LLDP_TLV_PORT_ID: if (tlv_count != 2) { log_warnx("lldp", - "second TLV should be a port ID on %s, not %d", - hardware->h_ifname, tlv_type); + "Port ID TLV should be second on %s, but it is on position %d", + hardware->h_ifname, tlv_count); goto malformed; } break; case LLDP_TLV_TTL: if (tlv_count != 3) { log_warnx("lldp", - "third TLV should be a TTL on %s, not %d", - hardware->h_ifname, tlv_type); + "TTL TLV should be third on %s, but it is on position %d", + hardware->h_ifname, tlv_count); goto malformed; } break;