Commit 093f7043 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

listen to disabled ipsec nat entries, closes https://github.com/opnsense/core/issues/439

(cherry picked from commit cd537c7b)
parent 1385c4a8
......@@ -1650,7 +1650,7 @@ function filter_nat_rules_generate() {
if (isset($config['ipsec']) && is_array($config['ipsec']) && isset($config['ipsec']['enable'])) {
if (isset($config['ipsec']['phase2'])) {
foreach ($config['ipsec']['phase2'] as $ph2ent) {
if ($ph2ent['mode'] != 'transport' && !empty($ph2ent['natlocalid'])) {
if ($ph2ent['mode'] != 'transport' && !empty($ph2ent['natlocalid']) && !isset($ph2ent['disabled'])) {
if (!is_array($ph2ent['localid']))
$ph2ent['localid'] = array();
$ph2ent['localid']['mode'] = $ph2ent['mode'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment