]> git.ipfire.org Git - thirdparty/lldpd.git/commit - NEWS
frame: change checksum function
authorVincent Bernat <vincent@bernat.im>
Thu, 14 May 2015 22:45:51 +0000 (00:45 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 14 May 2015 22:45:51 +0000 (00:45 +0200)
commit63e52965607e52ab23b56bb41918ff6146ecfd55
treed6ddfdf0e1cc459b9903cb83fa021408ec295153
parent6d3c1ce032f877c4b2ed636dd145cd6362fbac08
frame: change checksum function

At the end of function, we used to call ntohs() but we also call the
same function before providing the checksum to POKE_UINT16 (which will
in turn call ntohs). We remove those two first extra calls as they
aren't necessary.

Moreover, the SNMP agent uses this function and this makes it
endian-dependant. We don't want that.

The function is quite convulated and isn't a classic checksum
function. I don't remember how I came with this function but since there
is the special case for Cisco devices and I know this special case work
now, I don't want to change to another function which may breaks this
special case.

Add a NEWS entry to let people know, just in case.
NEWS
src/daemon/frame.c
src/daemon/protocols/cdp.c
src/daemon/protocols/edp.c