diff options
author | Chris Buechler <cmb@ubuntu-s0.buechler.local> | 2009-10-01 17:58:05 -0400 |
---|---|---|
committer | Chris Buechler <cmb@ubuntu-s0.buechler.local> | 2009-10-01 17:58:05 -0400 |
commit | f22456396bace78cd2af33b88426c59d26ea2959 (patch) | |
tree | afe65347132699b314e74bef526805915cb8cb7b /config/siproxd.inc | |
parent | ca6a4b3fb5510b17698deab24ac1059b79f3327b (diff) | |
download | pfsense-packages-f22456396bace78cd2af33b88426c59d26ea2959.tar.gz pfsense-packages-f22456396bace78cd2af33b88426c59d26ea2959.tar.bz2 pfsense-packages-f22456396bace78cd2af33b88426c59d26ea2959.zip |
don't generate invalid ruleset
Diffstat (limited to 'config/siproxd.inc')
-rw-r--r-- | config/siproxd.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc index b37f5564..50ca53d8 100644 --- a/config/siproxd.inc +++ b/config/siproxd.inc @@ -72,15 +72,18 @@ function siproxd_generate_rules($type) { case 'nat': $rules .= "\n# Setup Sipproxd proxy redirect\n"; foreach ($ifaces as $iface) { - $rules .= "rdr on {$iface} proto udp from any to !($iface) port {$port} -> 127.0.0.1 port {$port}\n"; + if($iface <> "") + $rules .= "rdr on {$iface} proto udp from any to !($iface) port {$port} -> 127.0.0.1 port {$port}\n"; } break; case 'filter': case 'rule': foreach ($ifaces as $iface) { - $rules .= "# allow SIP signaling and RTP traffic\n"; - $rules .= "pass in quick on {$iface} proto udp from any to any port = {$port}\n"; - $rules .= "pass in quick on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n"; + if($iface <> "") { + $rules .= "# allow SIP signaling and RTP traffic\n"; + $rules .= "pass in quick on {$iface} proto udp from any to any port = {$port}\n"; + $rules .= "pass in quick on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n"; + } } break; default: |