From 13600d098723ca4567aa380144617e5c1791bbbc Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 2 Oct 2020 12:05:03 +0300 Subject: sys/linux/test: refactor and extend 802.11 tests 80211_setup_station is extended with frame injections and delays that are arranged in such a way that the device successuflly joins an access point. 80211_scan is a new test that starts a channel scan and then injects a beacon and a probe response. These additions were tested manually and were observed to fulfill their purpose. --- sys/linux/test/80211_setup_mesh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sys/linux/test/80211_setup_mesh') diff --git a/sys/linux/test/80211_setup_mesh b/sys/linux/test/80211_setup_mesh index ce6c72d86..f7652f0a4 100644 --- a/sys/linux/test/80211_setup_mesh +++ b/sys/linux/test/80211_setup_mesh @@ -1,17 +1,15 @@ r0 = socket$nl_generic(0x10, 0x3, 0x10) -r1 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000200)='nl80211\x00') -ioctl$sock_SIOCGIFINDEX_80211(r0, 0x8933, &(0x7f0000000700)={'wlan0\x00', 0x0}) +r1 = syz_genetlink_get_family_id$nl80211(&AUTO='nl80211\x00') +ioctl$sock_SIOCGIFINDEX_80211(r0, 0x8933, &AUTO={'wlan0\x00', 0x0}) -# set mesh mode for wlan0 +# Set mesh mode for wlan0. -sendmsg$NL80211_CMD_SET_INTERFACE(r0, &(0x7f0000000340)={0x0, 0x0, &(0x7f0000000300)={&(0x7f0000000240)={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_IFTYPE={AUTO, AUTO, 0x7, nil}]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) +sendmsg$NL80211_CMD_SET_INTERFACE(r0, &AUTO={0x0, 0x0, &AUTO={&AUTO={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_IFTYPE={AUTO, AUTO, 0x7, nil}]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) -# join mesh at wlan0 +# Join mesh at wlan0. -sendmsg$NL80211_CMD_JOIN_MESH(r0, &(0x7f0000000340)={0x0, 0x0, &(0x7f0000000300)={&(0x7f0000000240)={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_MESH_ID={AUTO, AUTO, @default, nil}, @chandef_params=[@NL80211_ATTR_WIPHY_FREQ={AUTO, AUTO, @default, nil}]]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) +sendmsg$NL80211_CMD_JOIN_MESH(r0, &AUTO={0x0, 0x0, &AUTO={&AUTO={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_MESH_ID={AUTO, AUTO, @default, nil}, @chandef_params=[@NL80211_ATTR_WIPHY_FREQ={AUTO, AUTO, @default, nil}]]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) -# Some sample commands +# Some sample commands. -# get MPP - -sendmsg$NL80211_CMD_GET_MPP(r0, &(0x7f0000000340)={0x0, 0x0, &(0x7f0000000300)={&(0x7f0000000240)={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_MAC={AUTO, AUTO, @device_a, nil}]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) +sendmsg$NL80211_CMD_GET_MPP(r0, &AUTO={0x0, 0x0, &AUTO={&AUTO={AUTO, r1, 0x5, 0x0, 0x0, {{AUTO, AUTO, AUTO}, {@val={AUTO, AUTO, r2, nil}, @void}}, [@NL80211_ATTR_MAC={AUTO, AUTO, @device_a, nil}]}, AUTO}, AUTO, AUTO, AUTO, 0x0}, 0x0) -- cgit mrf-deployment