From: Felix Fietkau Date: Sun, 31 Oct 2010 14:32:15 +0000 (+0000) Subject: nl80211: fix a station dump crash triggered by sending an invalid ifindex X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f742f85c2ec852e77906590e6fb17dc3f3bd74c8;p=openwrt%2Fstaging%2F981213.git nl80211: fix a station dump crash triggered by sending an invalid ifindex SVN-Revision: 23741 --- diff --git a/package/mac80211/patches/300-nl80211_dump_crash_fix.patch b/package/mac80211/patches/300-nl80211_dump_crash_fix.patch new file mode 100644 index 0000000000..3c6385f890 --- /dev/null +++ b/package/mac80211/patches/300-nl80211_dump_crash_fix.patch @@ -0,0 +1,13 @@ +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -224,8 +224,8 @@ static int nl80211_prepare_netdev_dump(s + } + + *rdev = cfg80211_get_dev_from_ifindex(sock_net(skb->sk), ifidx); +- if (IS_ERR(dev)) { +- err = PTR_ERR(dev); ++ if (IS_ERR(*rdev)) { ++ err = PTR_ERR(*rdev); + goto out_rtnl; + } +