From 767d814636706aea175f7b5faf1dbe433d30c950 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 23 Nov 2021 16:16:47 +0100 Subject: [PATCH] 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. --- src/etc/inc/interfaces.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index fead5d8ae..b306eed50 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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: