linux/net/core
Davide Caratti d212683805 flow_dissector: fix TTL and TOS dissection on IPv4 fragments
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>
2021-02-12 17:03:51 -08:00
..
bpf_sk_storage.c bpf: Expose bpf_sk_storage_* to iterator programs 2020-12-04 22:32:40 +01:00
datagram.c udp: fix skb_copy_and_csum_datagram with odd segment sizes 2021-02-04 18:56:56 -08:00
datagram.h
dev.c net: gro: do not keep too many GRO packets in napi->rx_list 2021-02-05 19:28:01 -08:00
dev_addr_lists.c
dev_ioctl.c
devlink.c net: core: devlink: use right genl user_ptr when handling port param get/set 2021-01-19 11:45:41 -08:00
drop_monitor.c
dst.c
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: Only provide bpf_sock_from_file with CONFIG_NET 2020-12-08 18:23:36 -08:00
flow_dissector.c flow_dissector: fix TTL and TOS dissection on IPv4 fragments 2021-02-12 17:03:51 -08:00
flow_offload.c net: flow_offload: Fix memory leak for indirect flow block 2020-12-09 16:08:33 -08:00
gen_estimator.c net_sched: gen_estimator: support large ewma log 2021-01-15 18:11:06 -08:00
gen_stats.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c lwt_bpf: Replace preempt_disable() with migrate_disable() 2020-12-07 11:53:40 -08:00
lwtunnel.c
Makefile
neighbour.c neighbour: Prevent a dead entry from updating gc_list 2021-01-30 11:09:07 -08:00
net-procfs.c
net-sysfs.c net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc 2020-12-28 13:26:46 -08:00
net-sysfs.h
net-traces.c
net_namespace.c fixes-v5.11 2020-12-14 16:40:27 -08:00
netclassid_cgroup.c net: Remove the err argument from sock_from_file 2020-12-04 22:32:40 +01:00
netevent.c
netpoll.c
netprio_cgroup.c net: Remove the err argument from sock_from_file 2020-12-04 22:32:40 +01:00
page_pool.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c net: make free_netdev() more lenient with unregistering devices 2021-01-08 19:27:41 -08:00
scm.c
secure_seq.c
skbuff.c skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too 2021-01-16 19:02:04 -08:00
skmsg.c
sock.c net: Remove the err argument from sock_from_file 2020-12-04 22:32:40 +01:00
sock_diag.c
sock_map.c
sock_reuseport.c udp: Prevent reuseport_select_sock from reading uninitialized socks 2021-01-08 19:15:40 -08:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00