updated to support new --log-level argument and use a new iptables chain

pull/11/head
Peter Dunkley 12 years ago
parent 7e6f1b5bfa
commit 7a14c45e5c

@ -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 <<EOF > "$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

@ -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

Loading…
Cancel
Save