From 7a14c45e5c920910640cae66ba73469a4011f74e Mon Sep 17 00:00:00 2001 From: Peter Dunkley Date: Tue, 15 Oct 2013 12:56:41 +0100 Subject: [PATCH] updated to support new --log-level argument and use a new iptables chain --- el/mediaproxy-ng.init | 16 ++++++++++++---- el/mediaproxy-ng.sysconfig | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/el/mediaproxy-ng.init b/el/mediaproxy-ng.init index dc13d99..9984740 100644 --- a/el/mediaproxy-ng.init +++ b/el/mediaproxy-ng.init @@ -131,6 +131,11 @@ build_opts() { then OPTS+=" --b2b-url=$B2B_URL" fi + + if [[ -n "$LOG_LEVEL" ]] + then + OPTS+=" --log-level=$LOG_LEVEL" + fi } start() { @@ -139,10 +144,12 @@ start() { then echo "Loading module for in-kernel packet forwarding" modprobe xt_MEDIAPROXY - iptables -I INPUT -p udp -j MEDIAPROXY --id $TABLE + iptables -N mediaproxy + iptables -t filter -A INPUT -j mediaproxy + iptables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE if [[ IP6 == 1 ]] then - ip6tables -I INPUT -p udp -j MEDIAPROXY --id $TABLE + ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE fi cat < "$cachefile" @@ -168,10 +175,11 @@ stop() { . "$cachefile" echo "Unloading module for in-kernel packet forwarding" echo "del $TABLE" > /proc/mediaproxy/control - iptables -D INPUT -p udp -j MEDIAPROXY --id $CUR_TABLE + iptables -D mediaproxy -j MEDIAPROXY --id $CUR_TABLE + iptables -D mediaproxy -p udp -j MEDIAPROXY --id $CUR_TABLE if [[ CUR_IP6 == 1 ]] then - ip6tables -D INPUT -p udp -j MEDIAPROXY --id $CUR_TABLE + ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id $CUR_TABLE fi # rmmod xt_MEDIAPROXY rm -f $cachefile diff --git a/el/mediaproxy-ng.sysconfig b/el/mediaproxy-ng.sysconfig index b88d3a5..e1a5a82 100644 --- a/el/mediaproxy-ng.sysconfig +++ b/el/mediaproxy-ng.sysconfig @@ -32,6 +32,7 @@ LISTEN_UDP=127.0.0.1:2222 # IP address and port combination for UDP #PORT_MAX=40000 # (o) Highest port in the local port range for media # traffic. Default: 40000 # +#LOG_LEVEL=6 # Log level to use # The following items are for use with NGCP #REDIS=127.0.0.1:6379 #REDIS_DB=0