summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/vpn.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 624098d..2e72a6d 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -164,7 +164,10 @@ function vpn_ipsec_configure($ipchg = false)
if (!is_ipaddr($rg))
continue;
}
-
+ if(array_search($rg, $rgmap)) {
+ log_error("The remote gateway {$rg} already exists on another phase 1 entry");
+ continue;
+ }
$rgmap[$ph1ent['remote-gateway']] = $rg;
/* step through each phase2 entry */
OpenPOWER on IntegriCloud