diff options
author | Bert Karwatzki <spasswolf@web.de> | 2025-05-21 01:34:29 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-05-21 10:26:22 +0300 |
commit | d7500fbfb12067ee7313f13f4c58f771be3018ab (patch) | |
tree | ad18cb4943e6c4da5c5a361f070856be131e3d1c /net/mac80211/mesh.c | |
parent | 68b44b05f4c880c42109a91d2e0e7faa94f40529 (diff) | |
download | linux-d7500fbfb12067ee7313f13f4c58f771be3018ab.tar.xz |
wifi: check if socket flags are valid
Checking the SOCK_WIFI_STATUS flag bit in sk_flags may give wrong results
since sk_flags are part of a union and the union is used otherwise. Add
sk_requests_wifi_status() which checks if sk is non-NULL, sk is a full
socket (so flags are valid) and checks the flag bit.
Fixes: 76a853f86c97 ("wifi: free SKBTX_WIFI_STATUS skb tx_flags flag")
Suggested-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Bert Karwatzki <spasswolf@web.de>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250520223430.6875-1-spasswolf@web.de
[edit commit message, fix indentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index a381b4b756ea..5cc56d578048 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -777,7 +777,7 @@ bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, if (ethertype < ETH_P_802_3_MIN) return false; - if (skb->sk && sock_flag(skb->sk, SOCK_WIFI_STATUS)) + if (sk_requests_wifi_status(skb->sk)) return false; if (skb->ip_summed == CHECKSUM_PARTIAL) { |