kernel_optimize_test/net/batman-adv
Linus Lüssing ba5ea61462 bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls
This patch refactors ip_mc_check_igmp(), ipv6_mc_check_mld() and
their callers (more precisely, the Linux bridge) to not rely on
the skb_trimmed parameter anymore.

An skb with its tail trimmed to the IP packet length was initially
introduced for the following three reasons:

1) To be able to verify the ICMPv6 checksum.
2) To be able to distinguish the version of an IGMP or MLD query.
   They are distinguishable only by their size.
3) To avoid parsing data for an IGMPv3 or MLDv2 report that is
   beyond the IP packet but still within the skb.

The first case still uses a cloned and potentially trimmed skb to
verfiy. However, there is no need to propagate it to the caller.
For the second and third case explicit IP packet length checks were
added.

This hopefully makes ip_mc_check_igmp() and ipv6_mc_check_mld() easier
to read and verfiy, as well as easier to use.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-22 17:18:08 -08:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Add inconsistent gateway netlink dump detection 2018-11-12 10:41:51 +01:00
bat_iv_ogm.h batman-adv: Unify include guards style 2018-07-07 22:02:17 +02:00
bat_v_elp.c batman-adv: Use explicit tvlv padding for ELP packets 2018-11-12 10:41:29 +01:00
bat_v_elp.h
bat_v_ogm.c
bat_v_ogm.h batman-adv: Unify include guards style 2018-07-07 22:02:17 +02:00
bat_v.c batman-adv: Add inconsistent gateway netlink dump detection 2018-11-12 10:41:51 +01:00
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: Add inconsistent claim netlink dump detection 2018-11-12 10:41:51 +01:00
bridge_loop_avoidance.h
debugfs.c batman-adv: Add includes for deprecation warning 2018-11-12 10:41:50 +01:00
debugfs.h batman-adv: Mark debugfs functionality as deprecated 2018-09-14 10:50:26 +02:00
distributed-arp-table.c batman-adv: Add inconsistent dat netlink dump detection 2018-11-12 10:41:51 +01:00
distributed-arp-table.h
fragmentation.c batman-adv: Expand merged fragment buffer for full packet 2018-11-12 10:41:29 +01:00
fragmentation.h
gateway_client.c batman-adv: Add inconsistent gateway netlink dump detection 2018-11-12 10:41:51 +01:00
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c batman-adv: Add inconsistent hardif netlink dump detection 2018-11-12 10:41:51 +01:00
hard-interface.h
hash.c batman-adv: Store modification counter via hash helpers 2018-11-12 10:41:51 +01:00
hash.h batman-adv: Store modification counter via hash helpers 2018-11-12 10:41:51 +01:00
icmp_socket.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
icmp_socket.h
Kconfig batman-adv: enable MCAST by default at compile time 2018-11-12 10:41:51 +01:00
log.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
log.h
main.c batman-adv: Add inconsistent hardif netlink dump detection 2018-11-12 10:41:51 +01:00
main.h batman-adv: Add inconsistent hardif netlink dump detection 2018-11-12 10:41:51 +01:00
Makefile batman-adv: Provide debug messages as trace events 2018-09-15 09:51:08 +02:00
multicast.c bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls 2019-01-22 17:18:08 -08:00
multicast.h
netlink.c batman-adv: Add inconsistent hardif netlink dump detection 2018-11-12 10:41:51 +01:00
netlink.h
network-coding.c batman-adv: Prevent duplicated nc_node entry 2018-09-06 13:55:58 +02:00
network-coding.h
originator.c batman-adv: Move OGM rebroadcast stats to orig_ifinfo 2018-09-15 09:51:10 +02:00
originator.h batman-adv: Move OGM rebroadcast stats to orig_ifinfo 2018-09-15 09:51:10 +02:00
routing.c
routing.h
send.c
send.h
soft-interface.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
soft-interface.h
sysfs.c batman-adv: Fix segfault when writing to sysfs elp_interval 2018-09-06 13:54:48 +02:00
sysfs.h
tp_meter.c
tp_meter.h
trace.c batman-adv: Improve includes for trace functionality 2018-11-12 10:41:50 +01:00
trace.h batman-adv: Improve includes for trace functionality 2018-11-12 10:41:50 +01:00
translation-table.c batman-adv: Add inconsistent local TT netlink dump detection 2018-11-12 10:41:51 +01:00
translation-table.h
tvlv.c batman-adv: Prevent duplicated tvlv handler 2018-09-06 14:37:13 +02:00
tvlv.h
types.h batman-adv: Add inconsistent gateway netlink dump detection 2018-11-12 10:41:51 +01:00