Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4591db4f authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller
Browse files

[NETNS][IPV6] route6 - add netns parameter to ip6_route_output



Add an netns parameter to ip6_route_output. That will allow to access
to the right routing table for outgoing traffic.

Signed-off-by: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fda7350
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@ extern struct rt6_info *ip6_blk_hole_entry;

extern void			ip6_route_input(struct sk_buff *skb);

extern struct dst_entry *	ip6_route_output(struct sock *sk,
extern struct dst_entry *	ip6_route_output(struct net *net,
						 struct sock *sk,
						 struct flowi *fl);

extern int			ip6_route_init(void);
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static inline int icmpv6_xrlim_allow(struct sock *sk, int type,
	 * XXX: perhaps the expire for routing entries cloned by
	 * this lookup should be more aggressive (not longer than timeout).
	 */
	dst = ip6_route_output(sk, fl);
	dst = ip6_route_output(&init_net, sk, fl);
	if (dst->error) {
		IP6_INC_STATS(ip6_dst_idev(dst),
			      IPSTATS_MIB_OUTNOROUTES);
+2 −2
Original line number Diff line number Diff line
@@ -913,7 +913,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
	int err;

	if (*dst == NULL)
		*dst = ip6_route_output(sk, fl);
		*dst = ip6_route_output(&init_net, sk, fl);

	if ((err = (*dst)->error))
		goto out_err_release;
@@ -954,7 +954,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
				dst_release(*dst);
				memcpy(&fl_gw, fl, sizeof(struct flowi));
				memset(&fl_gw.fl6_dst, 0, sizeof(struct in6_addr));
				*dst = ip6_route_output(sk, &fl_gw);
				*dst = ip6_route_output(&init_net, sk, &fl_gw);
				if ((err = (*dst)->error))
					goto out_err_release;
			}
+1 −1
Original line number Diff line number Diff line
@@ -847,7 +847,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
	if ((dst = ip6_tnl_dst_check(t)) != NULL)
		dst_hold(dst);
	else {
		dst = ip6_route_output(NULL, fl);
		dst = ip6_route_output(&init_net, NULL, fl);

		if (dst->error || xfrm_lookup(&dst, fl, NULL, 0) < 0)
			goto tx_err_link_failure;
+1 −1
Original line number Diff line number Diff line
@@ -1427,7 +1427,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
	icmpv6_flow_init(ndisc_socket->sk, &fl, NDISC_REDIRECT,
			 &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex);

	dst = ip6_route_output(NULL, &fl);
	dst = ip6_route_output(&init_net, NULL, &fl);
	if (dst == NULL)
		return;

Loading