diff options
author | Peter Oskolkov <posk@google.com> | 2018-08-28 21:36:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-30 05:49:36 +0300 |
commit | 0ff89efb524631ac9901b81446b453c29711c376 (patch) | |
tree | f495b689a886f40a9a53742565b930fb9b3f755b /tools/testing/selftests/android | |
parent | b943f17e06493fd2c7fd00743093ad5dcdb90e7f (diff) | |
download | linux-0ff89efb524631ac9901b81446b453c29711c376.tar.xz |
ip: fail fast on IP defrag errors
The current behavior of IP defragmentation is inconsistent:
- some overlapping/wrong length fragments are dropped without
affecting the queue;
- most overlapping fragments cause the whole frag queue to be dropped.
This patch brings consistency: if a bad fragment is detected,
the whole frag queue is dropped. Two major benefits:
- fail fast: corrupted frag queues are cleared immediately, instead of
by timeout;
- testing of overlapping fragments is now much easier: any kind of
random fragment length mutation now leads to the frag queue being
discarded (IP packet dropped); before this patch, some overlaps were
"corrected", with tests not seeing expected packet drops.
Note that in one case (see "if (end&7)" conditional) the current
behavior is preserved as there are concerns that this could be
legitimate padding.
Signed-off-by: Peter Oskolkov <posk@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/android')
0 files changed, 0 insertions, 0 deletions