From 8c7c7100b5df8f0621eb414bc39ee1078bf6a213 Mon Sep 17 00:00:00 2001 From: hecke Date: Fri, 23 Jun 2017 08:55:01 +0200 Subject: [PATCH] add note that explains relaxed bytes-left check #6150 --- src/libsystemd-network/lldp-neighbor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsystemd-network/lldp-neighbor.c b/src/libsystemd-network/lldp-neighbor.c index 03f6628ab08..f1fecba6fa4 100644 --- a/src/libsystemd-network/lldp-neighbor.c +++ b/src/libsystemd-network/lldp-neighbor.c @@ -250,6 +250,9 @@ int lldp_neighbor_parse(sd_lldp_neighbor *n) { return -EBADMSG; } + /* Note that after processing the SD_LLDP_TYPE_END left could still be > 0 + * as the message may contain padding (see IEEE 802.1AB-2016, sec. 8.5.12) */ + goto end_marker; case SD_LLDP_TYPE_CHASSIS_ID: -- 2.47.3