Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Dumazet and committed by
Jakub Kicinski
d6bb2d1e 2776d232

+1 -1
+1 -1
include/net/ip.h
··· 99 99 #define PKTINFO_SKB_CB(skb) ((struct in_pktinfo *)((skb)->cb)) 100 100 101 101 /* return enslaved device index if relevant */ 102 - static inline int inet_sdif(struct sk_buff *skb) 102 + static inline int inet_sdif(const struct sk_buff *skb) 103 103 { 104 104 #if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV) 105 105 if (skb && ipv4_l3mdev_skb(IPCB(skb)->flags))