Can hostap&madwifi support several bcast keys of one AP?

=?gb2312?q?=CD=F5=ABh?= wangyue0921
Tue Oct 14 03:06:20 PDT 2008


hi, Jouni
Thank u for ur letters.
Follow ur advice, i deployed hostap-0.6.4 based on the
wireless-testing.git, with AP mode patch.(use ath5k)
hostapd works well.thank u:)

1. But i'm worried about the nl80211 can set vlan for 
different vlans, because the function:
it seems that vlan_id will not be used.
so how does the driver know which vlan the sta should
belong to?

static int i802_set_sta_vlan(void *priv, const u8
*addr,
                             const char *ifname, int
vlan_id)
{
        struct i802_driver_data *drv = priv;
        struct nl_msg *msg;
        int ret = -1;

        msg = nlmsg_alloc();
        if (!msg)
                goto out;

        genlmsg_put(msg, 0, 0,
genl_family_get_id(drv->nl80211), 0,
                    0, NL80211_CMD_SET_STATION, 0);

        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
                    if_nametoindex(drv->iface));
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN,
addr);
        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
                    if_nametoindex(ifname));

        ret = 0;

        if (nl_send_auto_complete(drv->nl_handle, msg)
< 0 ||
            (errno = nl_wait_for_ack(drv->nl_handle) <
0)) {
                ret = -1;
        }

 nla_put_failure:
        nlmsg_free(msg);

 out:
        return ret;
}

2. Besides, if hostap and mac80211 do support vlans 
and encryption with different GTKs for differnet
vlans,
i hope to deploy a wireless system and test this 
function.
But i'm not sure the atheros 5k chipset and its driver
can support this function. So would u mind show me ur
environment(wireless chipset, operation system 
version, hostapd version...) that can realize this 
function as ur former letters?

Thanks in advance!

Regards,
yue  

--- Jouni Malinen <j at w1.fi>??:

> On Sat, Sep 27, 2008 at 10:46:00AM +0800, ?h wrote:
> 
> > 1. I find that is 802.11i, it is said that:
> > 
> > The GTK shall be derived from the GMK by
> > GTK ? PRF-X(GMK, ?Group key expansion? || AA ||
> > GNonce)
> 
> > AA is the AP's bssid, and if there is only ONE
> bssid
> > or ONE VAP, how can I generate two different GTKs?
> 
> By using different GMK and/or GNonce value.
> 
> > I read the hostap's source and find that it will
> create
> > different GMK by "hostapd_get_rand". Is it because
> the
> > function be called at different time to generate 
> > different GMK, and then to generate different GTK?
> 
> hostapd has separate data entries for each group key
> and as such, GMK
> can be different for GTK derivation.
> 
> > According to Jouni's letter, if wlan is deployed
> with
> > ath9k + mac80211-based drivers + hostap + some
> kernel
> > patch, the function above will be realized??
> 
> It may. I haven't tested this with ath9k and the
> current mac80211, but
> the original IEEE 802.11 code that used as basis for
> mac80211 did indeed
> support this.
> 
> > If it does, where to obtain the ath9k's
> mac80211-based
> > drivers?
> 
> It's included in the current Linux kernel tree;
> wireless-testing git
> tree could be the best starting point since it has
> the latest available
> code and AP mode is likely to require quite recent
> changes.
> 
> > What is the "a minimal patch to enable AP mode in
> the
> > kernel code" and where to obtain it? 
> 
> http://w1.fi/wireless-testing/enable-ap-mode.patch
> 
> -- 
> Jouni Malinen                                       
>     PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
> 



      ___________________________________________________________ 
 ???????????? 
http://cn.mail.yahoo.com/



More information about the Hostap mailing list