[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150915092838.GK25499@secunet.com>
Date: Tue, 15 Sep 2015 11:28:38 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: David Ahern <dsa@...ulusnetworks.com>
CC: <netdev@...r.kernel.org>, <herbert@...dor.apana.org.au>,
<davem@...emloft.net>
Subject: Re: [PATCH] xfrm: Add oif to dst lookups
On Mon, Aug 10, 2015 at 04:58:11PM -0600, David Ahern wrote:
> Rules can be installed that direct route lookups to specific tables based
> on oif. Plumb the oif through the xfrm lookups so it gets set in the flow
> struct and passed to the resolver routines.
>
> Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
David, this change broke vti tunnels.
> @@ -1690,8 +1694,8 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
>
> if (xfrm[i]->props.mode != XFRM_MODE_TRANSPORT) {
> family = xfrm[i]->props.family;
> - dst = xfrm_dst_lookup(xfrm[i], tos, &saddr, &daddr,
> - family);
> + dst = xfrm_dst_lookup(xfrm[i], tos, fl->flowi_oif,
> + &saddr, &daddr, family);
Passing the original output interface to xfrm_dst_lookup will generate
a routing loop whenever the original output interface is not identical
to the tunnel endpoint, like it is with vti. We can not ask for a route
through a specific interface here. This is the lookup for the tunnel
endpoints, so it must return a route through the local tunnel endpoint
device.
I don't know how you are going to use this with your vrf changes, so
I'm not sure how to fix this in a way that it works with vrf. Please
look into this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists