]> git.ipfire.org Git - thirdparty/systemd.git/commit
lldp: fix parsing of TLV length
authorBeniamino Galvani <bgalvani@redhat.com>
Tue, 29 Sep 2015 15:48:37 +0000 (17:48 +0200)
committerBeniamino Galvani <bgalvani@redhat.com>
Fri, 2 Oct 2015 15:39:22 +0000 (17:39 +0200)
commit29eca2ff897dfbac65ef401515effb055da65339
tree7ff8a046eece158560e6f8e87be54b271c0ac1d3
parent0037c2dc54ca5bc5a3ec428619ff136066467565
lldp: fix parsing of TLV length

tlv_packet_read_bytes() and tlv_packet_read_string() returned the
wrong length when called after other functions which modify the offset
in the container.

In other words, if the TLV data length is X and we do a
tlv_packet_read_u8(), a subsequent tlv_packet_read_bytes() should
return a length of (X - 1).
src/libsystemd-network/lldp-tlv.c