From 58b45cd533eb25732e466c0bdf5502fb5039b5ed Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 12 Sep 2023 10:59:34 +0200 Subject: [PATCH] interfaces: kill the ancient OpenVPN-tap-on-a-bridge magic on IPv4 reload This brings IPv4 and IPv6 closer together as both now support GIF/GRE exclusively. OpenVPN devices are created on boot since 44cd7aee8e. --- src/etc/rc.newwanip | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip index 2b0276f84..cb6ec5af2 100755 --- a/src/etc/rc.newwanip +++ b/src/etc/rc.newwanip @@ -62,20 +62,9 @@ if (!isset($config['interfaces'][$interface]['enable'])) { system_resolver_configure(); list ($ip) = interfaces_primary_address($interface); - if (!is_ipaddr($ip)) { - /* - * Take care of OpenVPN and similar if you generate the event - * to reconfigure an interface. OpenVPN might be in tap(4) - * mode and not have an IP address. - */ - if (substr($device, 0, 4) != 'ovpn') { - log_msg("Failed to detect IP for interface {$interface}", LOG_INFO); - return; - } - - /* force a non-IP value here that makes the problem explicit when debugged */ - $ip = 'openvpn_xxx'; + log_msg("Failed to detect IP for interface {$interface}", LOG_INFO); + return; } $cacheip_file = "/tmp/{$device}_oldip"; @@ -93,12 +82,6 @@ interfaces_vips_configure($interface, 4); $greifs = link_interface_to_gre($interface, true, 4); $gififs = link_interface_to_gif($interface, true, 4); -$bridge = link_interface_to_bridge($interface); -if (!empty($bridge)) { - /* XXX _interfaces_bridge_configure() is probably cleaner */ - interface_bridge_add_member($bridge, $device); -} - switch ($config['interfaces'][$interface]['ipaddrv6'] ?? 'none') { case '6to4': interface_6to4_configure($interface, $config['interfaces'][$interface], true);