network: DCHPv6: set valid_lft and preferred_lft

https://bugzilla.redhat.com/show_bug.cgi?id=1064365
master
Harald Hoyer 2014-03-27 12:31:23 +01:00
parent fd9f902477
commit ebe7411691
1 changed files with 7 additions and 3 deletions

View File

@ -64,13 +64,17 @@ setup_interface6() {
search=$(printf -- "$new_domain_search")
namesrv=$new_domain_name_servers
hostname=$new_host_name
lease_time=$new_dhcp_lease_time
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
[ -n "$new_max_life" ] && lease_time=$new_max_life
preferred_lft=$lease_time
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life

[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override

ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
dev ${netif} scope global valid_lft ${lease_time} \
preferred_lft ${lease_time}
dev ${netif} scope global \
${lease_time:+valid_lft $lease_time} \
${preferred_lft:+preferred_lft ${preferred_lft}}

[ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
if [ -n "$namesrv" ] ; then