summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xubuntu/scripts/wlan-download-test.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubuntu/scripts/wlan-download-test.sh b/ubuntu/scripts/wlan-download-test.sh
index 1c00edc..c219032 100755
--- a/ubuntu/scripts/wlan-download-test.sh
+++ b/ubuntu/scripts/wlan-download-test.sh
@@ -41,7 +41,7 @@ RET=0
pre_setup() {
# print ifconfig to know available interfaces
- ifconfig
+ ip addr
# make sure that rp_filter is set to 0
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
@@ -50,7 +50,7 @@ pre_setup() {
get_interface_and_ipaddr() {
# Assume eth and wlan are up and running
- WLAN_INTERFACE=`/sbin/ifconfig | grep wlan | awk '{print $1}'`
+ WLAN_INTERFACE=`ip addr | grep "state UP" -A2 | tail -1 | awk '{ print $NF }'`
echo wlan interface $WLAN_INTERFACE
OLD_GATEWAY_IP=`ip route list | grep default |awk '{print $3}'`