linux_dsm_epyc7002/tools/testing/selftests
Davide Caratti e3ccad57ac flow_dissector: fix TTL and TOS dissection on IPv4 fragments
[ Upstream commit d2126838050ccd1dadf310ffb78b2204f3b032b9 ]

the following command:

 # tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
   $tcflags dst_ip 192.0.2.2 ip_ttl 63 action drop

doesn't drop all IPv4 packets that match the configured TTL / destination
address. In particular, if "fragment offset" or "more fragments" have non
zero value in the IPv4 header, setting of FLOW_DISSECTOR_KEY_IP is simply
ignored. Fix this dissecting IPv4 TTL and TOS before fragment info; while
at it, add a selftest for tc flower's match on 'ip_ttl' that verifies the
correct behavior.

Fixes: 518d8a2e9b ("net/flow_dissector: add support for dissection of misc ip header fields")
Reported-by: Shuang Li <shuali@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-07 15:00:07 +02:00
..
android
arm64 kselftest: arm64: Fix exit code of sve-ptrace 2021-03-30 14:31:51 +02:00
bpf selftests/bpf: Set gopt opt_class to 0 if get tunnel opt failed 2021-03-30 14:31:58 +02:00
breakpoints
capabilities
cgroup
clone3 selftests: clone3: use SKIP instead of XFAIL 2020-11-05 10:08:15 -07:00
core selftests: core: use SKIP instead of XFAIL in close_range_test.c 2020-11-05 10:08:15 -07:00
cpu-hotplug
cpufreq
dmabuf-heaps kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir 2021-03-04 11:38:05 +01:00
drivers selftests: mlxsw: Set headroom size of correct port 2021-01-12 20:18:14 +01:00
efivarfs
exec tools/testing/selftests: add self-test for verifying load alignment 2020-10-16 11:11:21 -07:00
filesystems linux-kselftest-fixes-5.10-rc3 2020-11-06 15:42:42 -08:00
firmware linux-kselftest-next-5.10-rc1 2020-10-15 15:14:32 -07:00
fpu
ftrace selftests/ftrace: Update synthetic event syntax errors 2021-03-04 11:38:07 +01:00
futex
gpio
ia64
intel_pstate
ipc
ir
kcmp
kexec
kmod
kselftest
kvm selftests: kvm/set_memory_region_test: Fix race in move region test 2020-12-03 12:38:58 -05:00
lib
livepatch selftests/livepatch: Do not check order when using "comm" for dmesg checking 2020-08-27 15:27:24 +02:00
lkdtm Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
locking
media_tests
membarrier
memfd
memory-hotplug
mincore
mount selftests: mount: add nosymfollow tests 2020-08-27 16:06:47 -04:00
mqueue
net flow_dissector: fix TTL and TOS dissection on IPv4 fragments 2021-04-07 15:00:07 +02:00
netfilter selftests: netfilter: fix current year 2021-02-17 11:02:25 +01:00
nsfs
ntb
openat2
pid_namespace
pidfd selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c 2020-10-27 17:04:01 -06:00
powerpc selftests/powerpc: Make the test check in eeh-basic.sh posix compliant 2021-03-04 11:37:53 +01:00
prctl
proc selftests: proc: fix warning: _GNU_SOURCE redefined 2020-11-05 10:08:14 -07:00
pstore
ptp
ptrace selftests: Add missing gitignore entries 2020-09-23 10:19:25 -06:00
rcutorture Merge branch 'scftorture.2020.08.24a' into HEAD 2020-09-03 09:47:01 -07:00
resctrl
rseq rseq/selftests: Test MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ 2020-09-25 14:23:27 +02:00
rtc
safesetid
seccomp kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE 2021-03-04 11:38:41 +01:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing selftests: tc-testing: enable CONFIG_NET_SCH_RED as a module 2020-11-28 13:18:34 -08:00
timens selftests/timens: Add a test for futex() 2020-10-20 17:02:57 +02:00
timers
tmpfs
tpm2
uevent
user
vDSO
vm selftests/vm: fix building protection keys test 2021-01-12 20:18:14 +01:00
watchdog
wireguard wireguard: selftests: test multiple parallel streams 2021-03-04 11:38:47 +01:00
x86 * Misc minor cleanups and corrections to the fsgsbase code and 2020-10-12 10:44:24 -07:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh
kselftest_harness.h linux-kselftest-fixes-5.10-rc3 2020-11-06 15:42:42 -08:00
kselftest_install.sh
kselftest_module.h
kselftest.h
lib.mk selftests: filter kselftest headers from command in lib.mk 2020-10-27 16:51:06 -06:00
Makefile selftests: Extract run_kselftest.sh and generate stand-alone test list 2020-10-07 07:58:54 -06:00
run_kselftest.sh selftests/run_kselftest.sh: fix dry-run typo 2020-12-30 11:53:07 +01:00