From ff3d7fc46e7b4946c9897316f9208b6419781870 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 26 Apr 2019 08:52:54 +0200 Subject: [PATCH] interfaces: interface_has_gateway() gone, yikes --- src/etc/inc/interfaces.inc | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 9a044a9ca..1251f60f6 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -4049,39 +4049,6 @@ function get_interface_ipv6($interface = 'wan') return null; } -/* return true if interface has a gateway */ -function interface_has_gateway($friendly) -{ - global $config; - - if (!empty($config['interfaces'][$friendly])) { - $ifname = &config_read_array('interfaces', $friendly); - switch ($ifname['ipaddr']) { - case "dhcp": - case "pppoe": - case "pptp": - case "l2tp": - case "ppp": - return true; - break; - default: - if (substr($ifname['if'], 0, 4) == "ovpn") { - return true; - } - $tunnelif = substr($ifname['if'], 0, 3); - if ($tunnelif == "gif" || $tunnelif == "gre") { - return true; - } - if (!empty($ifname['gateway'])) { - return true; - } - break; - } - } - - return false; -} - /****f* interfaces/is_interface_wireless * NAME * is_interface_wireless - Returns if an interface is wireless