ip: fix udp/tcp checksum corner cases 77/21877/3
authorDave Barach <dave@barachs.net>
Wed, 4 Sep 2019 16:09:32 +0000 (12:09 -0400)
committerDave Barach <openvpp@barachs.net>
Sat, 7 Sep 2019 01:26:58 +0000 (01:26 +0000)
commitc4abafd83df38051765352785b146277734701f4
tree12633dc1337661d1c4d408df2d1bca67e1d940bc
parentb736e75d5bb2d132fb00c35b6aabaa52e5f624ad
ip: fix udp/tcp checksum corner cases

When checksumming chained buffers with odd lengths: insert a
NULL byte, or the calculation fails.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I380f7c42897bdb28c8c29aa1c4cdaaa849cc9ecc
13 files changed:
extras/oddbuf/setup.oddbuf [new file with mode: 0644]
src/plugins/oddbuf/CMakeLists.txt [new file with mode: 0644]
src/plugins/oddbuf/node.c [new file with mode: 0644]
src/plugins/oddbuf/oddbuf.api [new file with mode: 0644]
src/plugins/oddbuf/oddbuf.c [new file with mode: 0644]
src/plugins/oddbuf/oddbuf.h [new file with mode: 0644]
src/plugins/oddbuf/oddbuf_all_api_h.h [new file with mode: 0644]
src/plugins/oddbuf/oddbuf_msg_enum.h [new file with mode: 0644]
src/plugins/oddbuf/oddbuf_periodic.c [new file with mode: 0644]
src/plugins/oddbuf/oddbuf_test.c [new file with mode: 0644]
src/vlib/cli.c
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c