summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-10-12 08:49:29 +0100
committerDavid Howells <dhowells@redhat.com>2022-11-08 16:42:28 +0000
commit42fb06b391ace2aec5cdb1ebb8ff668f0a34332f (patch)
treeaa9e79d759167641a8101d126341c3aff5a7c68a /net/ipv6
parent8889a711f9b4dcf4dd1330fa493081beebd118c9 (diff)
downloadlinux-42fb06b391ace2aec5cdb1ebb8ff668f0a34332f.tar.gz
linux-42fb06b391ace2aec5cdb1ebb8ff668f0a34332f.tar.bz2
linux-42fb06b391ace2aec5cdb1ebb8ff668f0a34332f.zip
net: Change the udp encap_err_rcv to allow use of {ip,ipv6}_icmp_error()
Change the udp encap_err_rcv signature to match ip_icmp_error() and ipv6_icmp_error() so that those can be used from the called function and export them. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/datagram.c1
-rw-r--r--net/ipv6/udp.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index df7e032ce87d..7c7155b48f17 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -334,6 +334,7 @@ void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
if (sock_queue_err_skb(sk, skb))
kfree_skb(skb);
}
+EXPORT_SYMBOL_GPL(ipv6_icmp_error);
void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info)
{
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 297f7cc06044..4bc3fc27ec78 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -631,7 +631,8 @@ int __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
/* Tunnels don't have an application socket: don't pass errors back */
if (tunnel) {
if (udp_sk(sk)->encap_err_rcv)
- udp_sk(sk)->encap_err_rcv(sk, skb, offset);
+ udp_sk(sk)->encap_err_rcv(sk, skb, err, uh->dest,
+ ntohl(info), (u8 *)(uh+1));
goto out;
}