diff options
author | Eric Dumazet <edumazet@google.com> | 2020-11-10 00:13:49 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-11 02:57:14 +0100 |
commit | 7b58e63e744cbcdeafe0a52423014fd9c9f7e346 (patch) | |
tree | 9f9b4e2c1bc9dac9e1053805d90e1baf5ce09339 /net/ipv4/udp.c | |
parent | inet: constify inet_sdif() argument (diff) | |
download | linux-7b58e63e744cbcdeafe0a52423014fd9c9f7e346.tar.xz linux-7b58e63e744cbcdeafe0a52423014fd9c9f7e346.zip |
inet: udp{4|6}_lib_lookup_skb() skb argument is const
The skb is needed only to fetch the keys for the lookup.
Both functions are used from GRO stack, we do not want
accidental modification of the skb.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0d5cd6905749..c732f5acf720 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -541,7 +541,7 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb, inet_sdif(skb), udptable, skb); } -struct sock *udp4_lib_lookup_skb(struct sk_buff *skb, +struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb, __be16 sport, __be16 dport) { const struct iphdr *iph = ip_hdr(skb); |