From f22456396bace78cd2af33b88426c59d26ea2959 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 1 Oct 2009 17:58:05 -0400 Subject: don't generate invalid ruleset --- config/siproxd.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'config') 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: -- cgit v1.2.3