6 nc -i 1 -l 9876 > ${TMP_DIR}/nc_tmp &
9 #chkconfig echo-stream on
15 echo "Test failed: $L7VSD"
20 $L7VSADM -A -t 127.0.0.1:40001 -m ip --forwarded-for
23 echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --forwarded-for"
27 $L7VSADM -a -t 127.0.0.1:40001 -m ip -r 127.0.0.1:9876
30 echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m ip -r 127.0.0.1:9876"
35 echo -e -n "GET / HTTP/1.1\r
37 X-Forwarded-For: proxy1, proxy2\r
38 \r\n" | nc 127.0.0.1 40001
41 echo -e -n "GET / HTTP/1.1\r
43 X-Forwarded-For: proxy1, proxy2, 127.0.0.1\r
44 \r\n" > $TMP_DIR/nc_expect_tmp
46 if [ -n "`diff $TMP_DIR/nc_tmp $TMP_DIR/nc_expect_tmp`" ]
48 echo "Test failed: diff $TMP_DIR/nc_tmp $TMP_DIR/nc_expect_tmp"