[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3497834-1ab5-3315-bfbd-ac4f5236eee3@6wind.com>
Date: Wed, 5 Feb 2020 17:54:54 +0100
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: William Dauchy <w.dauchy@...teo.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 1/2] net, ip6_tunnel: enhance tunnel locate with link
check
Le 05/02/2020 à 17:29, William Dauchy a écrit :
[snip]
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index b5dd20c4599b..053f44691cc6 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -351,7 +351,8 @@ static struct ip6_tnl *ip6_tnl_locate(struct net *net,
> (t = rtnl_dereference(*tp)) != NULL;
> tp = &t->next) {
> if (ipv6_addr_equal(local, &t->parms.laddr) &&
> - ipv6_addr_equal(remote, &t->parms.raddr)) {
> + ipv6_addr_equal(remote, &t->parms.raddr) &&
> + p->link == t->parms.link) {
> if (create)
> return ERR_PTR(-EEXIST);
This is probably not so easy. If link becomes part of the key, at least
ip6_tnl_lookup() should also be updated.
You can also look at ip_tunnel_bind_dev() to check how the mtu is calculated.
Powered by blists - more mailing lists