mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
2776d2320a
commit
d6bb2d1e86
@@ -99,7 +99,7 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm,
|
|||||||
#define PKTINFO_SKB_CB(skb) ((struct in_pktinfo *)((skb)->cb))
|
#define PKTINFO_SKB_CB(skb) ((struct in_pktinfo *)((skb)->cb))
|
||||||
|
|
||||||
/* return enslaved device index if relevant */
|
/* 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 IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
|
||||||
if (skb && ipv4_l3mdev_skb(IPCB(skb)->flags))
|
if (skb && ipv4_l3mdev_skb(IPCB(skb)->flags))
|
||||||
|
Reference in New Issue
Block a user