Blame 0006-network-DCHPv6-set-valid_lft-and-preferred_lft.patch

Harald Hoyer 240f09
From ebe7411691fb01c278c088e74e9ca32453cc1370 Mon Sep 17 00:00:00 2001
Harald Hoyer 240f09
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 240f09
Date: Thu, 27 Mar 2014 12:31:23 +0100
Harald Hoyer 240f09
Subject: [PATCH] network: DCHPv6: set valid_lft and preferred_lft
Harald Hoyer 240f09
Harald Hoyer 240f09
https://bugzilla.redhat.com/show_bug.cgi?id=1064365
Harald Hoyer 240f09
---
Harald Hoyer 240f09
 modules.d/40network/dhclient-script.sh | 10 +++++++---
Harald Hoyer 240f09
 1 file changed, 7 insertions(+), 3 deletions(-)
Harald Hoyer 240f09
Harald Hoyer 240f09
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
Zbigniew Jędrzejewski-Szmek 7f4a44
index 50e8932627..ba05250de9 100755
Harald Hoyer 240f09
--- a/modules.d/40network/dhclient-script.sh
Harald Hoyer 240f09
+++ b/modules.d/40network/dhclient-script.sh
Harald Hoyer 240f09
@@ -64,13 +64,17 @@ setup_interface6() {
Harald Hoyer 240f09
     search=$(printf -- "$new_domain_search")
Harald Hoyer 240f09
     namesrv=$new_domain_name_servers
Harald Hoyer 240f09
     hostname=$new_host_name
Harald Hoyer 240f09
-    lease_time=$new_dhcp_lease_time
Harald Hoyer 240f09
+    [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
Harald Hoyer 240f09
+    [ -n "$new_max_life" ] && lease_time=$new_max_life
Harald Hoyer 240f09
+    preferred_lft=$lease_time
Harald Hoyer 240f09
+    [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
Harald Hoyer 240f09
 
Harald Hoyer 240f09
     [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
Harald Hoyer 240f09
 
Harald Hoyer 240f09
     ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
Harald Hoyer 240f09
-        dev ${netif} scope global valid_lft ${lease_time} \
Harald Hoyer 240f09
-        preferred_lft ${lease_time}
Harald Hoyer 240f09
+        dev ${netif} scope global \
Harald Hoyer 240f09
+        ${lease_time:+valid_lft $lease_time} \
Harald Hoyer 240f09
+        ${preferred_lft:+preferred_lft ${preferred_lft}}
Harald Hoyer 240f09
 
Harald Hoyer 240f09
     [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
Harald Hoyer 240f09
     if  [ -n "$namesrv" ] ; then
Zbigniew Jędrzejewski-Szmek 7f4a44
-- 
Zbigniew Jędrzejewski-Szmek 7f4a44
1.9.3
Zbigniew Jędrzejewski-Szmek 7f4a44