Commit "new ip checksum based on rfc1071 implementaion" introduced a bug which incorrectly computes checksum in case of odd-sized IPv4 header. This barely happens, so this remained unnoticed for so long.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- src/packet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/packet.c b/src/packet.c index 841a495..6df69b7 100644 --- a/src/packet.c +++ b/src/packet.c @@ -42,7 +42,7 @@ static int in_cksum(u_short * addr, int len) len -= 2; }
- if (len > 1) + if (len > 0) sum += *(unsigned char *) addr;
while (sum >> 16)
Vitezslav Samel vitezslav@samel.cz writes:
Commit "new ip checksum based on rfc1071 implementaion" introduced a bug which incorrectly computes checksum in case of odd-sized IPv4 header. This barely happens, so this remained unnoticed for so long.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz
src/packet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
applied.
iptraf-ng@lists.fedorahosted.org