Commit 90e3012e authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211_hwsim: clean up the skb before passing it back

We need to clean up the skb before we can copy it, this
is required for proper operation since the socket it is
still attached to could potentially live in a different
network namespace or so.
Signed-off-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent 3bfbe80e
......@@ -15,6 +15,8 @@
#include <linux/list.h>
#include <linux/spinlock.h>
#include <net/dst.h>
#include <net/xfrm.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
#include <linux/if_arp.h>
......@@ -409,6 +411,14 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
if (data->ps != PS_DISABLED)
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
/* release the skb's source info */
skb->dst = NULL;
skb->mark = 0;
/* Copy skb to all enabled radios that are on the current frequency */
list_for_each_entry(data2, &hwsim_radios, list) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment