aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-11-09 15:13:48 -0800
committerJakub Kicinski <kuba@kernel.org>2020-11-10 17:56:54 -0800
commitd6bb2d1e86903d3fbf895752ac2c0c2465534579 (patch)
treedb314fb3951c154324e50580429aa2765b4fc134 /include/net/ip.h
parentnet: dsa: fix unintended sign extension on a u16 left shift (diff)
downloadlinux-dev-d6bb2d1e86903d3fbf895752ac2c0c2465534579.tar.xz
linux-dev-d6bb2d1e86903d3fbf895752ac2c0c2465534579.zip
inet: constify inet_sdif() argument
inet_sdif() does not modify the skb. This will permit propagating the const qualifier in udp{4|6}_lib_lookup_skb() functions. 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 '')
-rw-r--r--include/net/ip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 2d6b985d11cc..e20874059f82 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -99,7 +99,7 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm,
#define PKTINFO_SKB_CB(skb) ((struct in_pktinfo *)((skb)->cb))
/* return enslaved device index if relevant */
-static inline int inet_sdif(struct sk_buff *skb)
+static inline int inet_sdif(const struct sk_buff *skb)
{
#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
if (skb && ipv4_l3mdev_skb(IPCB(skb)->flags))