]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.9/ipv4-define-__ipv4_neigh_lookup_noref-when-config_inet-is-disabled.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.9 / ipv4-define-__ipv4_neigh_lookup_noref-when-config_inet-is-disabled.patch
1 From 9b3040a6aafd7898ece7fc7efcbca71e42aa8069 Mon Sep 17 00:00:00 2001
2 From: David Ahern <dsahern@gmail.com>
3 Date: Sun, 5 May 2019 11:16:20 -0700
4 Subject: ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled
5
6 From: David Ahern <dsahern@gmail.com>
7
8 commit 9b3040a6aafd7898ece7fc7efcbca71e42aa8069 upstream.
9
10 Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is disabled.
11
12 Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit")
13 Reported-by: kbuild test robot <lkp@intel.com>
14 Signed-off-by: David Ahern <dsahern@gmail.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 include/net/arp.h | 8 ++++++++
21 1 file changed, 8 insertions(+)
22
23 --- a/include/net/arp.h
24 +++ b/include/net/arp.h
25 @@ -17,6 +17,7 @@ static inline u32 arp_hashfn(const void
26 return val * hash_rnd[0];
27 }
28
29 +#ifdef CONFIG_INET
30 static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key)
31 {
32 if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
33 @@ -24,6 +25,13 @@ static inline struct neighbour *__ipv4_n
34
35 return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev);
36 }
37 +#else
38 +static inline
39 +struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key)
40 +{
41 + return NULL;
42 +}
43 +#endif
44
45 static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 key)
46 {