• Peter Oskolkov's avatar
    selftests: net: fix/improve ip_defrag selftest · 3271a482
    Peter Oskolkov authored
    Commit ade44640 ("net: ipv4: do not handle duplicate fragments as
    overlapping") changed IPv4 defragmentation so that duplicate fragments,
    as well as _some_ fragments completely covered by previously delivered
    fragments, do not lead to the whole frag queue being discarded. This
    makes the existing ip_defrag selftest flaky.
    
    This patch
    * makes sure that negative IPv4 defrag tests generate truly overlapping
      fragments that trigger defrag queue drops;
    * tests that duplicate IPv4 fragments do not trigger defrag queue drops;
    * makes a couple of minor tweaks to the test aimed at increasing its code
      coverage and reduce flakiness.
    Signed-off-by: default avatarPeter Oskolkov <posk@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3271a482
ip_defrag.sh 1.22 KB