diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 97f71153584f..6a9e204c8024 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2779,7 +2779,8 @@ int ip_route_output_key(struct net *net, struct rtable **rp, struct flowi *flp) | |||
2779 | return ip_route_output_flow(net, rp, flp, NULL, 0); | 2779 | return ip_route_output_flow(net, rp, flp, NULL, 0); |
2780 | } | 2780 | } |
2781 | 2781 | ||
2782 | static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event, | 2782 | static int rt_fill_info(struct net *net, |
2783 | struct sk_buff *skb, u32 pid, u32 seq, int event, | ||
2783 | int nowait, unsigned int flags) | 2784 | int nowait, unsigned int flags) |
2784 | { | 2785 | { |
2785 | struct rtable *rt = skb->rtable; | 2786 | struct rtable *rt = skb->rtable; |
@@ -2844,8 +2845,8 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event, | |||
2844 | __be32 dst = rt->rt_dst; | 2845 | __be32 dst = rt->rt_dst; |
2845 | 2846 | ||
2846 | if (ipv4_is_multicast(dst) && !ipv4_is_local_multicast(dst) && | 2847 | if (ipv4_is_multicast(dst) && !ipv4_is_local_multicast(dst) && |
2847 | IPV4_DEVCONF_ALL(&init_net, MC_FORWARDING)) { | 2848 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)) { |
2848 | int err = ipmr_get_route(skb, r, nowait); | 2849 | int err = ipmr_get_route(net, skb, r, nowait); |
2849 | if (err <= 0) { | 2850 | if (err <= 0) { |
2850 | if (!nowait) { | 2851 | if (!nowait) { |
2851 | if (err == 0) | 2852 | if (err == 0) |
@@ -2950,7 +2951,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2950 | if (rtm->rtm_flags & RTM_F_NOTIFY) | 2951 | if (rtm->rtm_flags & RTM_F_NOTIFY) |
2951 | rt->rt_flags |= RTCF_NOTIFY; | 2952 | rt->rt_flags |= RTCF_NOTIFY; |
2952 | 2953 | ||
2953 | err = rt_fill_info(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, | 2954 | err = rt_fill_info(net, skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, |
2954 | RTM_NEWROUTE, 0, 0); | 2955 | RTM_NEWROUTE, 0, 0); |
2955 | if (err <= 0) | 2956 | if (err <= 0) |
2956 | goto errout_free; | 2957 | goto errout_free; |
@@ -2988,7 +2989,7 @@ int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
2988 | if (rt_is_expired(rt)) | 2989 | if (rt_is_expired(rt)) |
2989 | continue; | 2990 | continue; |
2990 | skb->dst = dst_clone(&rt->u.dst); | 2991 | skb->dst = dst_clone(&rt->u.dst); |
2991 | if (rt_fill_info(skb, NETLINK_CB(cb->skb).pid, | 2992 | if (rt_fill_info(net, skb, NETLINK_CB(cb->skb).pid, |
2992 | cb->nlh->nlmsg_seq, RTM_NEWROUTE, | 2993 | cb->nlh->nlmsg_seq, RTM_NEWROUTE, |
2993 | 1, NLM_F_MULTI) <= 0) { | 2994 | 1, NLM_F_MULTI) <= 0) { |
2994 | dst_release(xchg(&skb->dst, NULL)); | 2995 | dst_release(xchg(&skb->dst, NULL)); |