diff options
| author | David Ahern <dsahern@gmail.com> | 2019-05-05 14:16:20 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-05-05 14:25:49 -0400 |
| commit | 9b3040a6aafd7898ece7fc7efcbca71e42aa8069 (patch) | |
| tree | be2d2ece57597f86650e7b74708eb9633419f07c | |
| parent | 47d3d7fdb10a21c223036b58bd70ffdc24a472c4 (diff) | |
ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled
Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is disabled.
Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/net/arp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/arp.h b/include/net/arp.h index 977aabfcdc03..c8f580a0e6b1 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
| @@ -18,6 +18,7 @@ static inline u32 arp_hashfn(const void *pkey, const struct net_device *dev, u32 | |||
| 18 | return val * hash_rnd[0]; | 18 | return val * hash_rnd[0]; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | #ifdef CONFIG_INET | ||
| 21 | static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) | 22 | static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) |
| 22 | { | 23 | { |
| 23 | if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) | 24 | if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) |
| @@ -25,6 +26,13 @@ static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev | |||
| 25 | 26 | ||
| 26 | return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev); | 27 | return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev); |
| 27 | } | 28 | } |
| 29 | #else | ||
| 30 | static inline | ||
| 31 | struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) | ||
| 32 | { | ||
| 33 | return NULL; | ||
| 34 | } | ||
| 35 | #endif | ||
| 28 | 36 | ||
| 29 | static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 key) | 37 | static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 key) |
| 30 | { | 38 | { |
