CS-15942: Failed to apply Port Forwarding rule to Redundant router

Previously failed due to error in iptables command to use a list of IPs.
Fixed by using only its first assigned IP and subnet for guest IP network.

Reviewed-by: Jayapal Uradi and Abhinandan Prateek.

Signed-off-by: Rohit Yadav <rohit.yadav@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
This commit is contained in:
Rohit Yadav 2012-08-16 19:23:57 +05:30 committed by unknown
parent 3a0905b280
commit b9f5d29234
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ ip_to_dev() {
}
doHairpinNat () {
local vrGuestIPNetwork=$(sudo ip addr show dev eth0 | grep inet | grep eth0 | awk '{print $2}' )
local vrGuestIPNetwork=$(sudo ip addr show dev eth0 | grep inet | grep eth0 | awk '{print $2}' | head -1)
local vrGuestIP=$(echo $vrGuestIPNetwork | awk -F'/' '{print $1}')
local publicIp=$1