Skip to content

ip_frag: fix reassembly defects and add test

Stephen Hemminger dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 4 repliesIn review
  2. v28 patches 3 repliesSuperseded
  3. v16 patches 12 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ip_frag: tolerate duplicate fragmentslib/ip_frag/ip_frag_internal.c+17 -10 replies
2/8ip_frag: discard datagrams with overlapping fragmentslib/ip_frag/ip_frag_internal.c+30 -80 replies
3/8ip_frag: include protocol in IPv4 reassembly keylib/ip_frag/rte_ipv4_reassembly.c+7 -10 replies
4/8ip_frag: drop IPv6 fragments with per-fragment headerslib/ip_frag/rte_ipv6_reassembly.c+22 -01 reply
5/8ip_frag: reject oversized reassembled datagramslib/ip_frag/rte_ipv4_reassembly.c lib/ip_frag/rte_ipv6_reassembly.c+14 -40 replies
6/8app/test: add test for IP reassemblyapp/test/meson.build app/test/test_reassembly.c+676 -00 replies
7/8ip_frag: remove use of rte_memcpylib/ip_frag/rte_ipv6_fragmentation.c lib/ip_frag/rte_ipv6_reassembly.c+3 -51 reply
8/8doc: add release note about ip_frag changesdoc/guides/rel_notes/release_26_07.rst+10 -01 reply

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchKonstantin Ananyev
1/8A-b
2/8A-b
3/8A-b
4/8A-b
5/8A-b
6/8
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/8] ip_frag: fix reassembly defects and add test

The IP reassembly library tracks only a running byte total and reserved slots for the first and last fragments, with no coverage map. As a result it mishandles duplicate, overlapping, oversized, and misheadered fragments, and the IPv4 key is missing a field RFC 791 requires. There was also no functional test to catch any of it.

These came out of reviewing a duplicate-fragment report on the list.

Patches 1 and 2 are interdependent: the overlap discard relies on the duplicate handling so an exact duplicate is dropped on its own rather than discarding the whole datagram. The rest are independent.

Patch 6 adds a functional test modeled on the Linux selftest ip_defrag.c. It passes on this series; with any single fix reverted the matching case fails.

v3 - drop stable from one patch and reword release note

Stephen Hemminger (8):
ip_frag: tolerate duplicate fragments
ip_frag: discard datagrams with overlapping fragments
ip_frag: include protocol in IPv4 reassembly key
ip_frag: drop IPv6 fragments with per-fragment headers
ip_frag: reject oversized reassembled datagrams app/test: add test for IP reassembly
ip_frag: remove use of rte_memcpy
doc: add release note about ip_frag changes

 app/test/meson.build                   |   1 +
 app/test/test_reassembly.c             | 675 +++++++++++++++++++++++++
 doc/guides/rel_notes/release_26_07.rst |  10 +
 lib/ip_frag/ip_frag_internal.c         |  40 +-
 lib/ip_frag/rte_ipv4_reassembly.c      |  17 +-
 lib/ip_frag/rte_ipv6_fragmentation.c   |   3 +-
 lib/ip_frag/rte_ipv6_reassembly.c      |  36 +-
 7 files changed, 771 insertions(+), 11 deletions(-)
 create mode 100644 app/test/test_reassembly.c
Signature · 1 line
2.53.0