Loading include/net/route.h +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ extern int ip_rt_init(void); extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, __be32 src, struct net_device *dev); extern void rt_cache_flush(int how); extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); extern int ip_route_output_key(struct rtable **, struct flowi *flp); extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin); Loading Loading @@ -158,7 +158,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst, int err; if (!dst || !src) { err = __ip_route_output_key(rp, &fl); err = __ip_route_output_key(&init_net, rp, &fl); if (err) return err; fl.fl4_dst = (*rp)->rt_dst; Loading net/ipv4/icmp.c +2 −2 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) struct rtable *rt2; security_skb_classify_flow(skb_in, &fl); if (__ip_route_output_key(&rt, &fl)) if (__ip_route_output_key(&init_net, &rt, &fl)) goto out_unlock; /* No need to clone since we're just using its address. */ Loading @@ -592,7 +592,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) goto out_unlock; if (inet_addr_type(&init_net, fl.fl4_src) == RTN_LOCAL) err = __ip_route_output_key(&rt2, &fl); err = __ip_route_output_key(&init_net, &rt2, &fl); else { struct flowi fl2 = {}; struct dst_entry *odst; Loading net/ipv4/route.c +4 −3 Original line number Diff line number Diff line Loading @@ -2443,7 +2443,8 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, out: return err; } int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) int __ip_route_output_key(struct net *net, struct rtable **rp, const struct flowi *flp) { unsigned hash; struct rtable *rth; Loading @@ -2470,7 +2471,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) } rcu_read_unlock_bh(); return ip_route_output_slow(&init_net, rp, flp); return ip_route_output_slow(net, rp, flp); } EXPORT_SYMBOL_GPL(__ip_route_output_key); Loading Loading @@ -2536,7 +2537,7 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, { int err; if ((err = __ip_route_output_key(rp, flp)) != 0) if ((err = __ip_route_output_key(&init_net, rp, flp)) != 0) return err; if (flp->proto) { Loading net/ipv4/xfrm4_policy.c +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static struct dst_entry *xfrm4_dst_lookup(int tos, xfrm_address_t *saddr, if (saddr) fl.fl4_src = saddr->a4; err = __ip_route_output_key(&rt, &fl); err = __ip_route_output_key(&init_net, &rt, &fl); dst = &rt->u.dst; if (err) dst = ERR_PTR(err); Loading Loading
include/net/route.h +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ extern int ip_rt_init(void); extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, __be32 src, struct net_device *dev); extern void rt_cache_flush(int how); extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); extern int ip_route_output_key(struct rtable **, struct flowi *flp); extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin); Loading Loading @@ -158,7 +158,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst, int err; if (!dst || !src) { err = __ip_route_output_key(rp, &fl); err = __ip_route_output_key(&init_net, rp, &fl); if (err) return err; fl.fl4_dst = (*rp)->rt_dst; Loading
net/ipv4/icmp.c +2 −2 Original line number Diff line number Diff line Loading @@ -569,7 +569,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) struct rtable *rt2; security_skb_classify_flow(skb_in, &fl); if (__ip_route_output_key(&rt, &fl)) if (__ip_route_output_key(&init_net, &rt, &fl)) goto out_unlock; /* No need to clone since we're just using its address. */ Loading @@ -592,7 +592,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) goto out_unlock; if (inet_addr_type(&init_net, fl.fl4_src) == RTN_LOCAL) err = __ip_route_output_key(&rt2, &fl); err = __ip_route_output_key(&init_net, &rt2, &fl); else { struct flowi fl2 = {}; struct dst_entry *odst; Loading
net/ipv4/route.c +4 −3 Original line number Diff line number Diff line Loading @@ -2443,7 +2443,8 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, out: return err; } int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) int __ip_route_output_key(struct net *net, struct rtable **rp, const struct flowi *flp) { unsigned hash; struct rtable *rth; Loading @@ -2470,7 +2471,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) } rcu_read_unlock_bh(); return ip_route_output_slow(&init_net, rp, flp); return ip_route_output_slow(net, rp, flp); } EXPORT_SYMBOL_GPL(__ip_route_output_key); Loading Loading @@ -2536,7 +2537,7 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, { int err; if ((err = __ip_route_output_key(rp, flp)) != 0) if ((err = __ip_route_output_key(&init_net, rp, flp)) != 0) return err; if (flp->proto) { Loading
net/ipv4/xfrm4_policy.c +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static struct dst_entry *xfrm4_dst_lookup(int tos, xfrm_address_t *saddr, if (saddr) fl.fl4_src = saddr->a4; err = __ip_route_output_key(&rt, &fl); err = __ip_route_output_key(&init_net, &rt, &fl); dst = &rt->u.dst; if (err) dst = ERR_PTR(err); Loading