[PATCH 1/1] checking for attr ifidx in survey handler

shital jaju shital1391
Mon Jan 27 21:04:27 PST 2014


---
 src/drivers/driver_nl80211.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b5bf368..1d3c663 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -10552,7 +10552,10 @@ static int survey_handler(struct nl_msg *msg, void
*arg)
        nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
                  genlmsg_attrlen(gnlh, 0), NULL);

-       ifidx = nla_get_u32(tb[NL80211_ATTR_IFINDEX]);
+       if (tb[NL80211_ATTR_IFINDEX])
+               ifidx = nla_get_u32(tb[NL80211_ATTR_IFINDEX]);
+       else
+               return NL_SKIP;

        if (!tb[NL80211_ATTR_SURVEY_INFO])
                return NL_SKIP;
--
1.7.9.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20140128/721b9353/attachment.htm>



More information about the Hostap mailing list