diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-09-30 12:39:48 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2011-09-30 12:39:48 -0700 |
commit | e5de9ee4915bafd7f31a96260613d8b93aba8351 (patch) | |
tree | 47c5303a2648d7db953b60a2fc60857baee6adb2 /libnl_2 | |
parent | db982b06606e885186efc1ee32c9dd96216c12dc (diff) | |
download | core-e5de9ee4915bafd7f31a96260613d8b93aba8351.tar.gz core-e5de9ee4915bafd7f31a96260613d8b93aba8351.tar.bz2 core-e5de9ee4915bafd7f31a96260613d8b93aba8351.zip |
libnl_2: Fix getting family_id
Change-Id: I27b2495fb96852e960f647f032a5fcd446ec742b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'libnl_2')
-rw-r--r-- | libnl_2/genl/genl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnl_2/genl/genl.c b/libnl_2/genl/genl.c index dd207171a..244299327 100644 --- a/libnl_2/genl/genl.c +++ b/libnl_2/genl/genl.c @@ -112,6 +112,7 @@ int genl_ctrl_alloc_cache(struct nl_sock *sock, struct nl_cache **result) nlmhdr.nlmsg_pid = sock->s_local.nl_pid; /* Generic netlink header */ + memset(&gmhhdr, 0, sizeof(gmhhdr)); gmhhdr.cmd = CTRL_CMD_GETFAMILY; gmhhdr.version = CTRL_ATTR_FAMILY_ID; @@ -221,9 +222,11 @@ int genl_ctrl_alloc_cache(struct nl_sock *sock, struct nl_cache **result) /* Save the family id */ else if (nl80211_flag && - nla->nla_type == CTRL_ATTR_FAMILY_ID) - nl80211_genl_id = \ + nla->nla_type == CTRL_ATTR_FAMILY_ID) { + nl80211_genl_id = *((int *)nla_data(nla)); + nl80211_flag = 0; + } } |