[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

v4tunnel for ipv6: bug in ifupdown, ip or shorewall6 ?



  Hi,

  I'm trying to setup a router with ipv6. I found a bug but I do not know
if this is a ifupdown bug, a ip bug, or a shorewall6 bug.

  I've two ipv6 tunnels (one 6to4 tunnel and one from sixxs). So I tried
to setup shorewall6 with two providers ( http://shorewall.net/MultiISP.html ).
With this kind of config, shorewall6 try to duplicate the main routing table
into another one (in fact, two other ones : one per provider).
  I do not know the shorewall6 internal, but it try to run:
ip -6 route add table 1 2002:XXXX:YYYY::/64 via :: dev tun6to4 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
In my opinion, this is due to this entry in the main routing table:
# ip -6 route ls
[...]
2002:XXXX:YYYY::/64 via :: dev tun6to4  proto kernel  metric 256  mtu 1480 advmss 1420 hoplimit 4294967295
[...]

Note here the strange "via ::"

This route is added by ifupdown with the following configuration:
iface tun6to4 inet6 v4tunnel
        address 2002:XXXX:YYYY::1
        netmask 64
        endpoint 192.88.99.1
        local XX.XX.YY.YY
        gateway ::192.88.99.1
        post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

When setting up a static inet6 interface with the following config:
iface br0 inet6 static
        address 2002:XXXX:YYYY:1::1
        netmask 64
I do not have this "via ::" in the generated route:
# ip -6 route ls
[...]
2002:XXXX:YYYY:1::/64 dev br0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
[...]

If I manually remove the route and try to re-add it, I need to remove the "via ::"
(but my ipv6 network is also working correctly without this "via ::"):
# ip -6 route del 2002:XXXX:YYYY::/64 via :: dev tun6to4 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
# ip -6 route add 2002:XXXX:YYYY::/64 via :: dev tun6to4 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
RTNETLINK answers: Invalid argument
# ip -6 route add 2002:XXXX:YYYY::/64  dev tun6to4 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
# ip -6 route ls
[...]
2002:XXXX:YYYY::/64 dev tun6to4  proto kernel  metric 256  mtu 1480 advmss 1420 hoplimit 4294967295
[...]

So, my questions:
- is it a bug in ifupdown that adds this "via ::" when configuring v4tunnel ?
- is it a bug in the "ip" command that should accept the syntax it displays ?
- is it a bug in shorewall6 that should detect this syntax and register the
  route without the "via ::" (or with another syntax to keep "via ::" if this
  is correct) ?

  Regards,
    Vincent

PS: there is the same problem with the route of the link-local address
# ip -6 route ls
[...]
fe80::/64 dev br0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
[...]
fe80::/64 via :: dev tun6to4  proto kernel  metric 256  mtu 1480 advmss 1420 hoplimit 4294967295
[...]

-- 
Vincent Danjean       GPG key ID 0x9D025E87         vdanjean@debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A  8A94 0BF7 7867 9D02 5E87
Unofficial pacakges: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://perso.debian.org/~vdanjean/debian unstable main


Reply to: