]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: ping: fix wrong checksum for large frames
authorEric Dumazet <edumazet@google.com>
Tue, 11 Oct 2022 21:27:28 +0000 (14:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Oct 2022 08:10:02 +0000 (09:10 +0100)
commit64573231bfecfcb04bdb4c4a6057f53dfea71de6
tree088b5f8431814ad237703ccd1fdc693892dc0d1e
parente832f1312516b38e3fe20b371ce5ac0a3bf561ad
ipv6: ping: fix wrong checksum for large frames

For a given ping datagram, ping_getfrag() is called once
per skb fragment.

A large datagram requiring more than one page fragment
is currently getting the checksum of the last fragment,
instead of the cumulative one.

After this patch, "ping -s 35000 ::1" is working correctly.

Fixes: 2c41d119cad3 ("net: ipv6: Add IPv6 support to the ping socket.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c