From 3bcd4ff62371fe7bc53145e55ccdd2d479475ee6 Mon Sep 17 00:00:00 2001 From: David Wood Date: Wed, 6 Jan 2016 02:03:07 +0000 Subject: Prevent ppp-ipv6 from taking any action when dhcp6 is active on the parent interface, not the PPP interface --- usr/local/sbin/ppp-ipv6 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'usr/local') diff --git a/usr/local/sbin/ppp-ipv6 b/usr/local/sbin/ppp-ipv6 index a05a4c2..b1cac73 100755 --- a/usr/local/sbin/ppp-ipv6 +++ b/usr/local/sbin/ppp-ipv6 @@ -25,6 +25,10 @@ function interface_ipv6_lower($interface_real) { switch ($ifcfg['ipaddrv6']) { case 'slaac': case 'dhcp6': + // Take no action if dhcp6 is active on the parent interface, not the PPP interface + if ($ifcfg['ipaddrv6']==='dhcp6' && !isset($ifcfg['dhcp6usev4iface'])) { + break; + } // bring down dhcp6c if it is running $pidv6 = find_dhcp6c_process($interface_real); if ($pidv6) { @@ -65,6 +69,10 @@ function interface_ipv6_raise($interface_real) { switch ($ifcfg['ipaddrv6']) { case 'slaac': case 'dhcp6': + // Take no action if dhcp6 is active on the parent interface, not the PPP interface + if ($ifcfg['ipaddrv6']==='dhcp6' && !isset($ifcfg['dhcp6usev4iface'])) { + break; + } $pidv6 = find_dhcp6c_process($interface_real); if (empty($pidv6)) { // only fire if router advertisements off -- cgit v1.1 From 20d6e88a88ae128f2c40a164e9b19e63e3c2e0f5 Mon Sep 17 00:00:00 2001 From: David Wood Date: Wed, 6 Jan 2016 09:19:52 +0000 Subject: Attempt to ensure interface_dhcpv6_configure() is called at the most appropriate time * ppp-ipv6 for PPP type with dhcp6usev4iface (or PPP without dhcp6usev4iface, as dhcp6usev4iface appears to be a no-op on this type of connection) * rc.newwanip for non-PPP type with dhcp6usev4iface (no change in this commit) * interface_configure() in all other cases --- usr/local/sbin/ppp-ipv6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/sbin/ppp-ipv6 b/usr/local/sbin/ppp-ipv6 index b1cac73..b7bb9f2 100755 --- a/usr/local/sbin/ppp-ipv6 +++ b/usr/local/sbin/ppp-ipv6 @@ -26,7 +26,7 @@ function interface_ipv6_lower($interface_real) { case 'slaac': case 'dhcp6': // Take no action if dhcp6 is active on the parent interface, not the PPP interface - if ($ifcfg['ipaddrv6']==='dhcp6' && !isset($ifcfg['dhcp6usev4iface'])) { + if ($ifcfg['ipaddrv6']==='dhcp6' && !(isset($ifcfg['dhcp6usev4iface']) || $ifcfg['ipaddr']==='ppp')) { break; } // bring down dhcp6c if it is running @@ -70,7 +70,7 @@ function interface_ipv6_raise($interface_real) { case 'slaac': case 'dhcp6': // Take no action if dhcp6 is active on the parent interface, not the PPP interface - if ($ifcfg['ipaddrv6']==='dhcp6' && !isset($ifcfg['dhcp6usev4iface'])) { + if ($ifcfg['ipaddrv6']==='dhcp6' && !(isset($ifcfg['dhcp6usev4iface']) || $ifcfg['ipaddr']==='ppp')) { break; } $pidv6 = find_dhcp6c_process($interface_real); -- cgit v1.1