summaryrefslogtreecommitdiff
path: root/net/ipv6/udp_offload.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2022-11-14 13:57:56 -0800
committerDavid S. Miller <davem@davemloft.net>2022-11-16 09:43:35 +0000
commitba6aac1516779dd0ced22c136a2c2c4a9c70cf29 (patch)
tree2019f124f03b93dc19d9d264fd35a4898ff07e42 /net/ipv6/udp_offload.c
parent478aee5d6bf617c932f4e9c2981f17e86e093fc5 (diff)
downloadlinux-ba6aac1516779dd0ced22c136a2c2c4a9c70cf29.tar.gz
udp: Access &udp_table via net.
We will soon introduce an optional per-netns hash table for UDP. This means we cannot use udp_table directly in most places. Instead, access it via net->ipv4.udp_table. The access will be valid only while initialising udp_table itself and creating/destroying each netns. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp_offload.c')
-rw-r--r--net/ipv6/udp_offload.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 7720d04ed396..e0e10f6bcdc1 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -116,10 +116,11 @@ static struct sock *udp6_gro_lookup_skb(struct sk_buff *skb, __be16 sport,
__be16 dport)
{
const struct ipv6hdr *iph = skb_gro_network_header(skb);
+ struct net *net = dev_net(skb->dev);
- return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
+ return __udp6_lib_lookup(net, &iph->saddr, sport,
&iph->daddr, dport, inet6_iif(skb),
- inet6_sdif(skb), &udp_table, NULL);
+ inet6_sdif(skb), net->ipv4.udp_table, NULL);
}
INDIRECT_CALLABLE_SCOPE