Skip to content

Commit fcac05d

Browse files
IurmanJkuba-moo
authored andcommitted
net: ipv6: exthdrs: get rid of ipv6_skb_net()
Get rid of ipv6_skb_net() which is only used in ipv6_hop_ioam(). Signed-off-by: Justin Iurman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d9c822f commit fcac05d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

net/ipv6/exthdrs.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -883,14 +883,6 @@ void ipv6_exthdrs_exit(void)
883883
Hop-by-hop options.
884884
**********************************/
885885

886-
/*
887-
* Note: we cannot rely on skb_dst(skb) before we assign it in ip6_route_input().
888-
*/
889-
static inline struct net *ipv6_skb_net(struct sk_buff *skb)
890-
{
891-
return skb_dst(skb) ? dev_net(skb_dst(skb)->dev) : dev_net(skb->dev);
892-
}
893-
894886
/* Router Alert as of RFC 2711 */
895887

896888
static bool ipv6_hop_ra(struct sk_buff *skb, int optoff)
@@ -941,7 +933,7 @@ static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff)
941933
goto drop;
942934

943935
/* Ignore if the IOAM namespace is unknown */
944-
ns = ioam6_namespace(ipv6_skb_net(skb), trace->namespace_id);
936+
ns = ioam6_namespace(dev_net(skb->dev), trace->namespace_id);
945937
if (!ns)
946938
goto ignore;
947939

0 commit comments

Comments
 (0)