Skip to contentSkip to conversation

nl80211: Reset split_start when netlink skb is exhausted

PATCH Applied Pontus Fuchs 2 participants 2 messages Jan 16, 2014 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nl80211: Reset split_start when netlink skb is exhausted

When the netlink skb is exhausted split_start is left set. In the subsequent retry, with a larger buffer, the dump is continued from the failing point instead of from the beginning.

This was causing my rt28xx based USB dongle to now show up when running "iw list" with an old iw version without split dump support.

---
 net/wireless/nl80211.c | 1 +
 1 file changed, 1 insertion(+)
net/wireless/nl80211.c +1 -0
index d0afd82..c7ce4c7 100644
@@ -1725,6 +1725,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
 				    !skb->len &&
 				    cb->min_dump_alloc < 4096) {
 					cb->min_dump_alloc = 4096;
+					state->split_start = 0;
 					rtnl_unlock();
 					return 1;
 				}
Signature · 1 line
1.8.3.2
maintainer Applied
#1 lore raw
Quoted 6 lines · Pontus Fuchs

When the netlink skb is exhausted split_start is left set. In the subsequent retry, with a larger buffer, the dump is continued from the failing point instead of from the beginning.

This was causing my rt28xx based USB dongle to now show up when running "iw list" with an old iw version without split dump support.

Thanks, applied. I added Cc: stable and Fixes: tags as well as adding "! state->split" to the conditions.

johannes