interfaces: on a device node there is no parent to use

Seems to have been in the code for a while.  dhcp6usev4iface should
have probably been the default all along since otherwise this seeps
into the default mode on IPv6 causing it to fail.
This commit is contained in:
Franco Fichtner 2021-11-23 16:16:47 +01:00
parent 8250ad50c3
commit 767d814636

View File

@ -3713,10 +3713,10 @@ function get_real_interface($interface = 'wan', $family = 'all')
case 'ppp':
case 'l2tp':
case 'pptp':
if (isset($cfg['dhcp6usev4iface'])) {
list ($realif) = get_parent_interface($interface);
if (isset($cfg['dhcp6usev4iface']) || strpos($realif, '/') === 0) {
/* parent interface not usable on user request or if device node */
$realif = $cfg['if'];
} else {
list ($realif) = get_parent_interface($interface);
}
break;
default: