From fafb8fe838b6a5de3d75bf812fece5848e079512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 26 Nov 2008 21:14:43 +0000 Subject: [PATCH] Handle the case where WAN might be disabled or renamed. --- etc/inc/filter.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 53f2c2750e..8bd4780820 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1042,7 +1042,7 @@ function filter_nat_rules_generate() $pptpdtarget = "127.0.0.1"; else if ($pptpdcfg['mode'] == "redir") $pptpdtarget = $pptpdcfg['redir']; - if ($pptpdcfg['mode'] == "redir") { + if ($pptpdcfg['mode'] == "redir" && is_array($FilterIflist['wan'])) { /* * NB: ermal -- the rdr rule below is commented out now that we have a solution * for PPTP passthrough. This unbreaks other GRE traffic passing @@ -1052,8 +1052,8 @@ function filter_nat_rules_generate() $natrules .= << $pptpdtarget -rdr on \$WAN proto tcp from any to any port 1723 -> $pptpdtarget +#rdr on \${$FilterIflist['wan']['descr']} proto gre from any to any -> $pptpdtarget +rdr on \${$FilterIflist['wan']['descr']} proto tcp from any to any port 1723 -> $pptpdtarget EOD; }