Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix for eliminating invalid GIF/GRE gateways of the wrong address family
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
You can’t perform that action at this time.