From b94bae87f1f9ca2e7de43abcb37fa192dcd65e18 Mon Sep 17 00:00:00 2001 From: sybasesql Date: Mon, 5 Jan 2015 17:39:55 +0300 Subject: [PATCH 1/2] Update rtpengine.init Refactoring $RTP_IP/$RTP_IP6 so we can use a number of parameters for --interface command line --- el/rtpengine.init | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/el/rtpengine.init b/el/rtpengine.init index 876b2ea64..927f458be 100644 --- a/el/rtpengine.init +++ b/el/rtpengine.init @@ -56,26 +56,22 @@ build_opts() { fi shopt -u nocasematch - if [[ -n "$RTP_IP" ]] - then - OPTS+=" --interface=$RTP_IP" - fi - - if [[ -n "$RTP_ADV_IP" ]] - then - OPTS+="!$RTP_ADV_IP" - fi - - if [[ -n "$RTP_IP6" ]] - then - OPTS+=" --interface=$RTP_IP6" - IP6=1 - fi + if [[ -n "$RTP_IP" ]] + then + for IP in "${RTP_IP[@]}" + do + OPTS+=" --interface=$IP" + done + fi - if [[ -n "$RTP_ADV_IP6" ]] - then - OPTS+="!$RTP_ADV_IP6" - fi + if [[ -n "$RTP_IP6" ]] + then + for IP6 in "${RTP_IP6[@]}" + do + OPTS+=" --interface=$IP6" + done + IP6=1 + fi if [[ -n "$LISTEN_TCP" ]] then From 08ffc9c35a6b8d6f3deafbe250625f59d23b14c0 Mon Sep 17 00:00:00 2001 From: sybasesql Date: Mon, 5 Jan 2015 17:43:24 +0300 Subject: [PATCH 2/2] Update rtpengine.sysconfig Refactoring $RTP_IP/$RTP_IP6 so we can use a number of parameters for --interface command line --- el/rtpengine.sysconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/el/rtpengine.sysconfig b/el/rtpengine.sysconfig index 70e93370a..f30b00d22 100644 --- a/el/rtpengine.sysconfig +++ b/el/rtpengine.sysconfig @@ -8,10 +8,8 @@ TABLE=0 # (o) iptables table for in-kernel forwarding rules # comment out when "KERNEL=no" FALLBACK=yes # (m) "yes" enables fallback to userspace forwarding # only, "no" disables -RTP_IP=127.0.0.1 # (m) Local IPv4 address for packet forwarding -#RTP_ADV_IP=127.0.0.1 # (o) IPv4 address to "advertise" for packet forwarding -#RTP_IP6=::1 # (o) Local IPv6 address for packet forwarding -#RTP_ADV_IP6=::1 # (o) IPv6 address to "advertise" for packet forwarding +RTP_IP[0]=127.0.0.1 # (m) Local IPv4 address for RTP. The format of the value is [NAME/]IP[!IP]. +#RTP_IP6[0]=::1 # (o) Local IPv6 address for RTP. The format of the value is [NAME/]IP[!IP]. # # At least one of LISTEN_(TCP|UDP|NG) is required #LISTEN_TCP=127.0.0.1:2222 # IP address and port combination for TCP