If memory serves me right, Yoshinobu Inoue wrote:
> I still made more several fixes to IPv6 configuration scripts.
>
> -changed the file rc.net6 to rc.network6
> -changed the func net6_pass1 to network6_pass1
> -changed several var name more unlikely to confilict
> -changed if several sentenses in rc.network6 to case sentence
> like in rc.network
> -wrapped many var names by {}
> -and other fixes
I ran across a few problems after I remade world. The new scoped
address syntax breaks /etc/rc.network6. In particular, some lines that
look like:
> + # disallow unicast packets without outgoing scope identifiers.
> + # if you instead want to route such packets to a "default" interface,
> + # comment out the 1st two lines, and enable the lines after them.
> + case ${ipv6_default_interface} in
> + '')
> + route add -inet6 fe80:: -prefixlen 10 ::1 -reject
> + ;;
> + *)
> + laddr=`ifconfig ${ipv6_default_interface} inet6 \
> + | grep 'inet6 fe80:' | head -1 | awk '{print $2}'`
> + route add -inet6 fe80:: ${laddr} -prefixlen 10 -interface \
> + -cloning
> + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \
> + -cloning
> + ;;
> + esac
The definition of $laddr is not compatible with the scoped addressing
syntax. Instead, it needs something like:
laddr=`ifconfig ${ipv6_default_interface} inet6 \
| grep "inet6 ${ipv6_default_interface}%fe80:" \
| head -1 | awk '{print $2}' | sed -e 's/.*%//'`
There's another, similar snippit of code in the router-specific part of
the script.
Another problem occurred when I modified /etc/rc.network6 as above:
route: writing to routing socket: Network is unreachable
add net fe80::: gateway fe80::1: Network is unreachable
route: writing to routing socket: Network is unreachable
add net ff02::: gateway fe80::1: Network is unreachable
add net ::ffff:0.0.0.0 gateway ::1
add net ::0.0.0.0 gateway ::1
net.inet.ip6.forwarding: 0 -> 0
net.inet.ip6.accept_rtadv: 0 -> 1
These actions all happened between the start and the end of DAD for my
(one) Ethernet interface (I have a single-homed host).
Finally, could you say whether or not lo0 should really be the default
value for ipv6_default_interface in /etc/defaults/rc.conf? I have this
vague feeling it's wrong but I don't know enough to say why:
> +ipv6_default_interface="lo0" # Default output interface for scoped addrs.
Thanks!
Bruce.
PGP signature