diff options
author | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-12-29 01:16:42 +0700 |
---|---|---|
committer | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-12-29 01:16:42 +0700 |
commit | 3fe017541e5741a1c5178074d8a357a87d02de72 (patch) | |
tree | 17786fe658ccb075742f0b39fc1dbe93588b1767 /templates-cfg | |
parent | e1a079e84af64924266188bb49a86f0d67ac2522 (diff) | |
download | vyatta-conntrack-3fe017541e5741a1c5178074d8a357a87d02de72.tar.gz vyatta-conntrack-3fe017541e5741a1c5178074d8a357a87d02de72.zip |
Something looking like a real fix for SIP port update problem.
Diffstat (limited to 'templates-cfg')
-rw-r--r-- | templates-cfg/system/conntrack/modules/sip/node.def | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates-cfg/system/conntrack/modules/sip/node.def b/templates-cfg/system/conntrack/modules/sip/node.def index 121d7a4..320fb71 100644 --- a/templates-cfg/system/conntrack/modules/sip/node.def +++ b/templates-cfg/system/conntrack/modules/sip/node.def @@ -6,7 +6,8 @@ end: /bin/cli-shell-api exists system conntrack modules sip disable && exit 0 defaultport=5060 portopt="ports=" portval="" - + portpath="system conntrack modules sip port" + if [ -f /sys/module/nf_conntrack_sip/parameters/sip_direct_media ]; then sdm=$(sudo cat /sys/module/nf_conntrack_sip/parameters/sip_direct_media) fi @@ -42,15 +43,15 @@ end: /bin/cli-shell-api exists system conntrack modules sip disable && exit 0 echo "Error: Can not specify more than 8 ports." exit 1 fi - reload=1 fi + if [ "$portval" != "" ]; then - portopt="${portopt}$portval" + portopt="${portopt}$portval" else portopt="${portopt}$defaultport" fi - if [ "$COMMIT_ACTION" == "DELETE" ]; then + if [ "`cli-shell-api returnValues $portpath`" != "`cli-shell-api returnEffectiveValues $portpath`" ]; then reload=1 fi @@ -71,3 +72,4 @@ end: /bin/cli-shell-api exists system conntrack modules sip disable && exit 0 sudo modprobe nf_conntrack_sip sudo modprobe nf_nat_sip fi + |