mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
ip/options: explicitly provide net ns to __ip_options_echo()
__ip_options_echo() uses the current network namespace, and currently retrives it via skb->dst->dev. This commit adds an explicit 'net' argument to __ip_options_echo() and update all the call sites to provide it, usually via a simpler sock_net(). After this change, __ip_options_echo() no more needs to access skb->dst and we can drop a couple of hack to preserve such info in the rx path. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a1e155ece1
commit
91ed1e666a
@@ -567,11 +567,12 @@ int ip_forward(struct sk_buff *skb);
|
||||
void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
|
||||
__be32 daddr, struct rtable *rt, int is_frag);
|
||||
|
||||
int __ip_options_echo(struct ip_options *dopt, struct sk_buff *skb,
|
||||
const struct ip_options *sopt);
|
||||
static inline int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
|
||||
int __ip_options_echo(struct net *net, struct ip_options *dopt,
|
||||
struct sk_buff *skb, const struct ip_options *sopt);
|
||||
static inline int ip_options_echo(struct net *net, struct ip_options *dopt,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
return __ip_options_echo(dopt, skb, &IPCB(skb)->opt);
|
||||
return __ip_options_echo(net, dopt, skb, &IPCB(skb)->opt);
|
||||
}
|
||||
|
||||
void ip_options_fragment(struct sk_buff *skb);
|
||||
|
||||
Reference in New Issue
Block a user