diff mbox series

[ovs-dev,v5,3/6] ofproto-dpif: Fix reassembly test for zero-payload frags.

Message ID 20260819102529.167827-4-elibr@nvidia.com
State Under Review
Delegated to: aaron conole
Headers show
Series ipf: Reject IPv4/v6 fragments with wrapping bounds. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_FreeBSD_Build_and_Test success github build: passed
ovsrobot/github-robot-_Build_and_Test fail github build: failed

Commit Message

Eli Britstein Aug. 19, 2026, 10:25 a.m. UTC
RFC 791 permits zero-payload last fragments, but common stacks
including the Linux kernel discard them.  Align the reassembly test
with that policy: use valid one-byte fragments, and update the expiry
coverage expectation for duplicate handling.

Assisted-by: composer-2.5-fast, Cursor
Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Eli Britstein <elibr@nvidia.com>
---
 tests/ofproto-dpif.at | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index f92bd8ce3..cd6430e4f 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -5536,9 +5536,9 @@  table=2 tcp actions=3
 AT_CHECK([ovs-ofctl -O OpenFlow11 replace-flows br0 flows.txt])
 
 dnl Test frag expiry.
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 0001 8192 40 06 3316 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0015 0001 8192 40 06 3315 ac11370d ac11370b 00"])
 ovs-appctl time/warp 10000
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 0001 8192 40 06 3316 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0015 0001 8192 40 06 3315 ac11370d ac11370b 00"])
 
 dnl Test that no packets flow.
 AT_CHECK([ovs-appctl dpctl/dump-flows filter=in_port\(90\) | strip_recirc | sort], [0], [dnl
@@ -5550,9 +5550,9 @@  dnl Expire second frag.
 ovs-appctl time/warp 10000
 
 dnl Test frag purge
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 0002 8192 40 06 3315 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0015 0002 8192 40 06 3314 ac11370d ac11370b 00"])
 ovs-appctl time/warp 33000
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 0003 8192 40 06 3314 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0015 0003 8192 40 06 3313 ac11370d ac11370b 00"])
 
 dnl Test that no packets flow.
 AT_CHECK([ovs-appctl dpctl/dump-flows filter=in_port\(90\) | strip_recirc | sort], [0], [dnl
@@ -5563,8 +5563,9 @@  recirc_id(<recirc>),in_port(90),packet_type(ns=0,id=0),eth(src=00:26:b9:8c:b0:f9
 dnl Purge second frag
 ovs-appctl time/warp 33000
 
-dnl Make sure all four packets are counted properly in the coverage.
-AT_CHECK([ovs-appctl coverage/show | grep -c "^ipf.*total: 2"], [0], [2
+dnl Make sure expiry and purge counters reflect the four packets sent.
+dnl The duplicate second fragment is counted as overlap, not a second expiry.
+AT_CHECK([ovs-appctl coverage/show | grep -c "^ipf.*total: 2"], [0], [1
 ])
 
 zero1208=$(printf '%0*d' 2416 0)