diff options
author | bz <bz@FreeBSD.org> | 2011-09-07 00:45:15 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2011-09-07 00:45:15 +0000 |
commit | d5bccf0f290a379883f36b2c5757eaf53088e7ec (patch) | |
tree | 26ccb914c9b3ce2a4813d3ece932ef3c305bf119 /usr.sbin/bsdinstall/scripts/netconfig_ipv6 | |
parent | 802a4d0e44b4d947b20e707e7031b29fc0b228ec (diff) | |
download | FreeBSD-src-d5bccf0f290a379883f36b2c5757eaf53088e7ec.zip FreeBSD-src-d5bccf0f290a379883f36b2c5757eaf53088e7ec.tar.gz |
Fix two problems:
1) if no default gateway is given the route command will fail
and the script will abort with an error leading to an endless
loop unless configuration is cancelled or changed. [1]
2) In the IPv6 case add -inet6 to not alter the legacy IP default
route.
Reported by: Oleg Ginzburg (olevole olevole.ru) [1]
Tested by: Oleg Ginzburg (olevole olevole.ru) [1]
Approved by: re (kib)
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/netconfig_ipv6')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index 8bff816..dc0d69f 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -142,7 +142,9 @@ BEGIN { if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` - route delete default - route add default ${ipv6_defaultrouter} + if [ -n "${ipv6_defaultrouter}" ]; then + route delete -inet6 default + route add -inet6 default ${ipv6_defaultrouter} + fi fi |