mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: Check for mac80211_hwsim module before loading it
Instead of checking if the kernel allows modules (via the presence of /proc/modules), check if mac80211_hwsim is already there and load it only if not. This gets rid of some ugly prints from modprobe in case code isn't even a module and cannot be found, etc. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
4dd712bd36
commit
2f9e2f9044
@ -110,7 +110,7 @@ else
|
|||||||
NUM_CH=1
|
NUM_CH=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7 channels=$NUM_CH support_p2p_device=0 dyndbg=+p
|
test -d /sys/module/mac80211_hwsim || sudo modprobe mac80211_hwsim radios=7 channels=$NUM_CH support_p2p_device=0 dyndbg=+p
|
||||||
|
|
||||||
sudo ifconfig hwsim0 up
|
sudo ifconfig hwsim0 up
|
||||||
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dtN -L $LOGDIR/hwsim0 &
|
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dtN -L $LOGDIR/hwsim0 &
|
||||||
|
Loading…
Reference in New Issue
Block a user