mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
interfaces: make rc.newwanipv6 more clever...
... since b8a3c3dd3f6c can mimic the behaviour of get_interface_ipv6() we can now call interfaces_primary_address6() instead of the less educated find_interface_ipv6*() equivalents. Probably quite some people with WAN aliases run into this issue where renewal doesn't work because rc.newwanipv6 latches on to the VIP instead of the primary address.
This commit is contained in:
parent
08fc36a327
commit
9904a1da4c
@ -3983,10 +3983,9 @@ function get_interface_ipv6($interface = 'wan', $ifconfig_details = null)
|
||||
return get_configured_carp_interface_list($interface, 'inet6');
|
||||
}
|
||||
|
||||
$realif = get_real_interface($interface, 'inet6');
|
||||
list ($ipv6) = interfaces_primary_address6($interface, null, $ifconfig_details);
|
||||
|
||||
return isset($config['interfaces'][$interface]['dhcp6prefixonly']) ?
|
||||
find_interface_ipv6_ll($realif, $ifconfig_details) : find_interface_ipv6($realif, $ifconfig_details);
|
||||
return $ipv6;
|
||||
}
|
||||
|
||||
/****f* interfaces/is_interface_wireless
|
||||
|
||||
@ -50,13 +50,13 @@ log_error("IP renewal is starting on '{$argument}'");
|
||||
if (empty($argument)) {
|
||||
$interface = 'wan';
|
||||
$interface_real = get_real_interface($interface, 'inet6');
|
||||
$ip = get_interface_ipv6($interface);
|
||||
} else {
|
||||
$interface = convert_real_interface_to_friendly_interface_name($argument);
|
||||
$interface_real = $argument;
|
||||
$ip = get_interface_ipv6($interface);
|
||||
}
|
||||
|
||||
$ip = get_interface_ipv6($interface);
|
||||
|
||||
if (!isset($config['interfaces'][$interface]['enable'])) {
|
||||
log_error("Interface '{$interface}' is disabled or empty, nothing to do.");
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user