---
 testcases/network/tcp_cmds/tcpdump/tcpdump01 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/network/tcp_cmds/tcpdump/tcpdump01 
b/testcases/network/tcp_cmds/tcpdump/tcpdump01
index 4866720..6d99398 100755
--- a/testcases/network/tcp_cmds/tcpdump/tcpdump01
+++ b/testcases/network/tcp_cmds/tcpdump/tcpdump01
@@ -47,8 +47,8 @@ do_setup()
     tst_setup

     exists awk grep host hostname ifconfig netstat ping tail tcpdump
-    RHOST=${RHOST:-`hostname`}
-    IP=`host ${RHOST} 2>/dev/null | awk '{print $4}'`
+    LHOST=${LHOST:-`hostname`}
+    IP=`ping ${LHOST} -c 1 | awk '{print $3}' | head -n1 | cut -f2 -d'(' | cut 
-f1 -d')'`
     IFNUMS=`netstat -i|wc -l`
     IFNUMS=$(( $IFNUMS - 2 ))
     IFNAME=${IFNAME:-$(netstat -i | awk '{print $1}' | tail -n ${IFNUMS})}
--
1.7.9.5


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to