bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() internals
authorLinus Lüssing <linus.luessing@c0d3.blue>
Mon, 21 Jan 2019 06:26:26 +0000 (07:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2019 01:18:08 +0000 (17:18 -0800)
commita2e2ca3bebe273055a212d754ffe4e0264192d74
tree7e67a61e9eafae3581f2995fbc54b65aacd72f8c
parentba5ea614622dca6d675b4cc8a97270569ae13a23
bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() internals

With this patch the internal use of the skb_trimmed is reduced to
the ICMPv6/IGMP checksum verification. And for the length checks
the newly introduced helper functions are used instead of calculating
and checking with skb->len directly.

These changes should hopefully make it easier to verify that length
checks are performed properly.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/igmp.c
net/ipv6/mcast_snoop.c