Make default interface work.

Obtained from:	KAME
This commit is contained in:
Hajimu UMEMOTO 2000-09-10 18:18:10 +00:00
parent 4a950c224b
commit 31a054d673
2 changed files with 8 additions and 10 deletions

View File

@ -319,7 +319,7 @@ network6_static_routes_setup() {
network6_default_interface_setup() {
# Choose IPv6 default interface if it is not clearly specified.
case ${ipv6_default_interface} in
[Nn][Oo] | '')
'')
for i in ${ipv6_network_interfaces}; do
laddr=`network6_getladdr $i exclude_tentative`
case ${laddr} in
@ -339,14 +339,13 @@ network6_default_interface_setup() {
case ${ipv6_default_interface} in
[Nn][Oo] | '')
route add -inet6 fe80:: -prefixlen 10 ::1 -reject
route add -inet6 ff02:: -prefixlen 16 ::1 -reject
route add -inet6 fec0:: -prefixlen 10 ::1 -reject
;;
*)
laddr=`network6_getladdr ${ipv6_default_interface}`
route add -inet6 fe80:: ${laddr} -prefixlen 10 -interface \
-cloning
route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \
route add -inet6 fec0:: ${laddr} -prefixlen 10 -interface \
-cloning
ndp -I ${ipv6_default_interface}
;;
esac
}

View File

@ -319,7 +319,7 @@ network6_static_routes_setup() {
network6_default_interface_setup() {
# Choose IPv6 default interface if it is not clearly specified.
case ${ipv6_default_interface} in
[Nn][Oo] | '')
'')
for i in ${ipv6_network_interfaces}; do
laddr=`network6_getladdr $i exclude_tentative`
case ${laddr} in
@ -339,14 +339,13 @@ network6_default_interface_setup() {
case ${ipv6_default_interface} in
[Nn][Oo] | '')
route add -inet6 fe80:: -prefixlen 10 ::1 -reject
route add -inet6 ff02:: -prefixlen 16 ::1 -reject
route add -inet6 fec0:: -prefixlen 10 ::1 -reject
;;
*)
laddr=`network6_getladdr ${ipv6_default_interface}`
route add -inet6 fe80:: ${laddr} -prefixlen 10 -interface \
-cloning
route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \
route add -inet6 fec0:: ${laddr} -prefixlen 10 -interface \
-cloning
ndp -I ${ipv6_default_interface}
;;
esac
}