diff options
author | sam <sam@FreeBSD.org> | 2008-02-03 18:21:13 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-02-03 18:21:13 +0000 |
commit | d6a0f9dd5e26fbbeef1bb06bcc9c09993484efe8 (patch) | |
tree | b461a3b7cec5839d10840618ba9560761239a570 /sbin/ifconfig | |
parent | a53bf17cee21ad0e4614ba3f61780334c414be47 (diff) | |
download | FreeBSD-src-d6a0f9dd5e26fbbeef1bb06bcc9c09993484efe8.zip FreeBSD-src-d6a0f9dd5e26fbbeef1bb06bcc9c09993484efe8.tar.gz |
fix list mac; broken in delta 1.48
Noticed by: JoaoBR
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index d024a71..bf829d5 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -2461,19 +2461,23 @@ list_mac(int s) if (verbose || c == '?') printpolicy(policy); - if (get80211len(s, IEEE80211_MACCMD_LIST, NULL, 0, &len) < 0) + ireq.i_val = IEEE80211_MACCMD_LIST; + ireq.i_len = 0; + if (ioctl(s, SIOCG80211, &ireq) < 0) err(1, "unable to get mac acl list size"); - if (len == 0) { /* NB: no acls */ + if (ireq.i_len == 0) { /* NB: no acls */ if (!(verbose || c == '?')) printpolicy(policy); return; } + len = ireq.i_len; data = malloc(len); if (data == NULL) err(1, "out of memory for acl list"); - if (get80211(s, IEEE80211_MACCMD_LIST, data, len) < 0) + ireq.i_data = data; + if (ioctl(s, SIOCG80211, &ireq) < 0) err(1, "unable to get mac acl list"); nacls = len / sizeof(*acllist); acllist = (struct ieee80211req_maclist *) data; |