[PATCH net-next] rxrpc: Fix missing IPV6 #ifdef

Andrew Lunn andrew at lunn.ch
Thu Nov 10 05:47:11 PST 2022


On Thu, Nov 10, 2022 at 09:43:34AM +0000, David Howells wrote:
> Fix rxrpc_encap_err_rcv() to make the call to ipv6_icmp_error conditional
> on IPV6 support being enabled.
> 
> Fixes: b6c66c4324e7 ("rxrpc: Use the core ICMP/ICMP6 parsers")
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: David Howells <dhowells at redhat.com>
> cc: Marc Dionne <marc.dionne at auristor.com>
> cc: linux-afs at lists.infradead.org
> cc: netdev at vger.kernel.org
> ---
> 
>  net/rxrpc/local_object.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
> index a178f71e5082..25cdfcf7b415 100644
> --- a/net/rxrpc/local_object.c
> +++ b/net/rxrpc/local_object.c
> @@ -33,7 +33,9 @@ static void rxrpc_encap_err_rcv(struct sock *sk, struct sk_buff *skb, int err,
>  {
>  	if (ip_hdr(skb)->version == IPVERSION)
>  		return ip_icmp_error(sk, skb, err, port, info, payload);
> +#ifdef CONFIG_AF_RXRPC_IPV6
>  	return ipv6_icmp_error(sk, skb, err, port, info, payload);
> +#endif

Can this be if (IS_ENABLED(CONFIG_AF_RXRPC_IPV6) {} rather than
#ifdef? It gives better build testing.

	Andrew



More information about the linux-afs mailing list