Last active
January 13, 2016 17:18
-
-
Save jim-p/a1b92a97e4a9ee7e30fb to your computer and use it in GitHub Desktop.
Fix for eliminating invalid GIF/GRE gateways of the wrong address family
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc | |
index 5ea49a0..88d2b86 100644 | |
--- a/src/etc/inc/interfaces.inc | |
+++ b/src/etc/inc/interfaces.inc | |
@@ -5589,7 +5589,9 @@ function interface_has_gateway($friendly) { | |
} | |
$tunnelif = substr($ifname['if'], 0, 3); | |
if ($tunnelif == "gif" || $tunnelif == "gre") { | |
- return true; | |
+ if (find_interface_ip($ifname['if'])) { | |
+ return true; | |
+ } | |
} | |
if (!empty($ifname['gateway'])) { | |
return true; | |
@@ -5620,7 +5622,9 @@ function interface_has_gatewayv6($friendly) { | |
} | |
$tunnelif = substr($ifname['if'], 0, 3); | |
if ($tunnelif == "gif" || $tunnelif == "gre") { | |
- return true; | |
+ if (find_interface_ipv6($ifname['if'])) { | |
+ return true; | |
+ } | |
} | |
if (!empty($ifname['gatewayv6'])) { | |
return true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment