]> git.baikalelectronics.ru Git - kernel.git/commit
icmp: introduce helper for nat'd source address in network device context
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 11 Feb 2020 19:47:05 +0000 (20:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2020 22:19:00 +0000 (14:19 -0800)
commit58f9e305c1ad3475f54358953732584dbaa7a57d
tree9d2df288a3386102321124f7442d304b7f4fa28e
parent69fac00fd3b466e273e955e4e5ecdeda48d784b7
icmp: introduce helper for nat'd source address in network device context

This introduces a helper function to be called only by network drivers
that wraps calls to icmp[v6]_send in a conntrack transformation, in case
NAT has been used. We don't want to pollute the non-driver path, though,
so we introduce this as a helper to be called by places that actually
make use of this, as suggested by Florian.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/icmpv6.h
include/net/icmp.h
net/ipv4/icmp.c
net/ipv6/ip6_icmp.c