diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-11-16 04:03:33 (GMT) |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-11-16 04:03:33 (GMT) |
commit | 56f4a560c6d6318b5a8e18a1b3e44909a5158d1e (patch) | |
tree | 3193b43eebd2cde7b13de9eb4b37cb5a1dccfdd0 /net | |
parent | 3871608e4cb995b0fb9c630da9ac45b246151fef (diff) | |
parent | 9b609ba2c2df8290054e5c62be69101b43e2a976 (diff) | |
download | linux-56f4a560c6d6318b5a8e18a1b3e44909a5158d1e.tar.xz |
Merge tag 'v4.9.62' into linux-linaro-lsk-v4.9
This is the 4.9.62 stable release
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa/Kconfig | 5 | ||||
-rw-r--r-- | net/ipv4/ah4.c | 3 | ||||
-rw-r--r-- | net/netfilter/nft_meta.c | 28 |
3 files changed, 33 insertions, 3 deletions
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index 96e47c5..39bb5b3 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -1,12 +1,13 @@ config HAVE_NET_DSA def_bool y - depends on NETDEVICES && !S390 + depends on INET && NETDEVICES && !S390 # Drivers must select NET_DSA and the appropriate tagging format config NET_DSA tristate "Distributed Switch Architecture" - depends on HAVE_NET_DSA && NET_SWITCHDEV + depends on HAVE_NET_DSA + select NET_SWITCHDEV select PHYLIB ---help--- Say Y if you want to enable support for the hardware switches supported diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index f2a7102..22377c8 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -270,6 +270,9 @@ static void ah_input_done(struct crypto_async_request *base, int err) int ihl = ip_hdrlen(skb); int ah_hlen = (ah->hdrlen + 2) << 2; + if (err) + goto out; + work_iph = AH_SKB_CB(skb)->tmp; auth_data = ah_tmp_auth(work_iph, ihl); icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); diff --git a/net/netfilter/nft_meta.c b/net/netfilter/nft_meta.c index 6c1e024..7c33955 100644 --- a/net/netfilter/nft_meta.c +++ b/net/netfilter/nft_meta.c @@ -159,8 +159,34 @@ void nft_meta_get_eval(const struct nft_expr *expr, else *dest = PACKET_BROADCAST; break; + case NFPROTO_NETDEV: + switch (skb->protocol) { + case htons(ETH_P_IP): { + int noff = skb_network_offset(skb); + struct iphdr *iph, _iph; + + iph = skb_header_pointer(skb, noff, + sizeof(_iph), &_iph); + if (!iph) + goto err; + + if (ipv4_is_multicast(iph->daddr)) + *dest = PACKET_MULTICAST; + else + *dest = PACKET_BROADCAST; + + break; + } + case htons(ETH_P_IPV6): + *dest = PACKET_MULTICAST; + break; + default: + WARN_ON_ONCE(1); + goto err; + } + break; default: - WARN_ON(1); + WARN_ON_ONCE(1); goto err; } break; |