diff options
author | Renato Botelho <garga@pfSense.org> | 2013-08-21 06:30:08 -0700 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2013-08-21 06:30:08 -0700 |
commit | 2c372d597c419ee36fcdda08c6830af9c9e1fc05 (patch) | |
tree | a91be58fd2064859d6daa4f6b7997cebb9414b99 /config | |
parent | fa5d8e2803b514103cf8b3a7b720a23c6e9bbb01 (diff) | |
parent | ac430d3f94c24610e7cb56e679595e4151ce821d (diff) | |
download | pfsense-packages-2c372d597c419ee36fcdda08c6830af9c9e1fc05.tar.gz pfsense-packages-2c372d597c419ee36fcdda08c6830af9c9e1fc05.tar.bz2 pfsense-packages-2c372d597c419ee36fcdda08c6830af9c9e1fc05.zip |
Merge pull request #476 from overhacked/fix-siproxd-rtpenable
siproxd: separate enable/disable of RTP proxy from rest of daemon
Diffstat (limited to 'config')
-rw-r--r-- | config/siproxd.inc | 10 | ||||
-rw-r--r-- | config/siproxd.xml | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc index 13254a42..a34f5b34 100644 --- a/config/siproxd.inc +++ b/config/siproxd.inc @@ -70,8 +70,8 @@ function siproxd_generate_rules($type) { } /* proxy is turned off in package settings */ - if($siproxd_conf['rtpenable'] == "0") { - log_error("WARNING: siproxd RTP proxy has not been enabled. Not installing rules."); + if($siproxd_conf['sipenable'] == "0") { + log_error("WARNING: siproxd proxy has not been enabled. Not installing rules."); return "\n"; } @@ -95,7 +95,9 @@ function siproxd_generate_rules($type) { if($iface <> "") { $rules .= "# allow SIP signaling and RTP traffic\n"; $rules .= "pass in on {$iface} proto udp from any to any port = {$port}\n"; - $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n"; + if($siproxd_conf['rtpenable'] == "1") { + $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n"; + } } } break; @@ -125,7 +127,7 @@ function sync_package_siproxd() { fwrite($fout, "# package management system.\n\n"); /* proxy is turned off in package settings */ - if($siproxd_conf['rtpenable'] == "0") { + if($siproxd_conf['sipenable'] == "0") { fclose($fout); return; } diff --git a/config/siproxd.xml b/config/siproxd.xml index 1176a423..1e16a9ea 100644 --- a/config/siproxd.xml +++ b/config/siproxd.xml @@ -84,6 +84,12 @@ </additional_files_needed> <fields> <field> + <fielddescr>Enable siproxd</fielddescr> + <fieldname>sipenable</fieldname> + <description>Enable or disable siproxd</description> + <type>checkbox</type> + </field> + <field> <fielddescr>Inbound interface</fielddescr> <fieldname>if_inbound</fieldname> <description>Select the inbound interface.</description> @@ -335,4 +341,4 @@ <custom_php_validation_command> validate_form_siproxd($_POST, &$input_errors); </custom_php_validation_command> -</packagegui>
\ No newline at end of file +</packagegui> |