[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 04017) Re: Linux kernel net/ipv6/ip6_tunnel.c
- To: gregoire.henry@xxxxxxxxxxxxxx
- Subject: (usagi-users 04017) Re: Linux kernel net/ipv6/ip6_tunnel.c
- From: Yasuyuki KOZAKAI <yasuyuki.kozakai@xxxxxxxxxxxxx>
- Date: Tue, 15 Jan 2008 21:39:57 +0900 (JST)
- Cc: kozakai@xxxxxxxxxxxxxx, vnuorval@xxxxxxxxxx, usagi-users@xxxxxxxxxxxxxx
- In-reply-to: <20070912142916.0b1dfc4c@cuivre.pps.jussieu.fr>
- References: <20070912142916.0b1dfc4c@cuivre.pps.jussieu.fr>
- Reply-to: usagi-users@xxxxxxxxxxxxxx
[Cc: usagi-users ]
Sorry for very late replying. I've noticed your mail now...
From: Gregoire Henry <gregoire.henry@xxxxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 14:29:16 +0200
> Dear ip6_tunnel hackers,
>
> Here is a single-line patch and one question.
>
> First: since this module allow to encapsulate IPv4 packets too, I
> believe, we may have to use 2 tunnels with the same endpoints but
> different encapsulated protocols. The current implementation did not
> allow this. A patch is attached. Hope it helps.
You can create tunnel which encapsulates both of IPv4 and IPv6 packets by
$ ip -f inet6 tunnel add <tunnel name> mode any local <local addr> <remote addr>
> Second: did you intends to implement something
> like NBMA tunnels as in net/ipv4/ip_gre.c ? (see
> http://linux-ip.net/gl/ip-tunnels/node4.html)
> Or, if not, have you an argument against I try to implement
> it and submit it to your expertise ?
No. I have no plan to implement it.
> Greetings,
> -- Grégoire Henry
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index ca774d8..926a930 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -282,7 +282,8 @@ static struct ip6_tnl *ip6_tnl_locate(struct ip6_tnl_parm *p, int create)
>
> for (t = *ip6_tnl_bucket(p); t; t = 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->proto == t->parms.proto)
> return t;
> }
> if (!create)
'proto' can be 0 (it means wildcard). So we have to consider the range of
the overlapped protocol number, if we really allow users to create multiple
tunnels for different inner protocols. I want to keep the current code for
simplicity and you can configure the tunnel which you want without this
patch.
Regards,
-- Yasuyuki Kozakai