ifconfig tunnel and /etc/network.subr mismatch
John Hay
jhay at meraka.org.za
Tue Oct 10 09:49:37 PDT 2006
Hi,
While trying to configure a IPv4-over-IPv6 tunnel, I found that the
old way of "ifconfig gif0 tunnel inet6 <my_ipv6_addr> <dest_ipv6_addr>"
does not work anymore. It gives an unhelpful error message:
######
ifconfig gif0 tunnel fd9c:6829:597c::1 fd9c:6829:597c:9:2c0:dfff:fef7:82eb
ifconfig: SIOCSIFPHYADDR: Address family not supported by protocol family
######
You have to swap inet6 and tunnel, so it should look like this
"ifconfig gif0 inet6 tunnel <my_ipv6_addr> <dest_ipv6_addr>"
The problem with that is that you cannot do that with the current
/etc/network.subr and rc.conf scripts because /etc/network.subr do it
this way:
######
ifconfig $i create >/dev/null 2>&1
ifconfig $i tunnel ${peers}
ifconfig $i up
######
The printfs in ifconfig also still show that one can have the "tunnel
inet6" syntax:
######
grep tunnel * | grep printf
af_inet.c: printf("\ttunnel inet %s --> %s\n", src, dst);
af_inet6.c: printf("\ttunnel inet6 %s --> %s\n", src, dst);
######
PR 97014 also mentioned the problem. So what should we do? Should
ifconfig be fixed or should network.subr be fixed?
John
--
John Hay -- John.Hay at meraka.csir.co.za / jhay at FreeBSD.org
More information about the freebsd-net
mailing list