]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
add note that explains relaxed bytes-left check #6150 6151/head
authorhecke <hecke@erblast>
Fri, 23 Jun 2017 06:55:01 +0000 (08:55 +0200)
committerhecke <hecke@erblast>
Fri, 23 Jun 2017 06:55:01 +0000 (08:55 +0200)
src/libsystemd-network/lldp-neighbor.c

index 03f6628ab08b09b6c81ba4ec25aef432b3364690..f1fecba6fa4f8b2031fe2e9c9c3583b89ffc8a2d 100644 (file)
@@ -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: