icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 25 Feb 2020 10:05:35 +0000 (18:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Feb 2020 19:01:39 +0000 (11:01 -0800)
commita8e41f6033a0c5633d55d6e35993c9e2005d872f
tree4aa8f0b328d331d013dd8687e55638e417dec65e
parent3614d05b5e6baf487e88fb114d884da172edd61a
icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n

The icmpv6_send function has long had a static inline implementation
with an empty body for CONFIG_IPV6=n, so that code calling it doesn't
need to be ifdef'd. The new icmpv6_ndo_send function, which is intended
for drivers as a drop-in replacement with an identical function
signature, should follow the same pattern. Without this patch, drivers
that used to work with CONFIG_IPV6=n now result in a linker error.

Cc: Chen Zhou <chenzhou10@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 0b41713b6066 ("icmp: introduce helper for nat'd source address in network device context")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/icmpv6.h