Search Linux Wireless

Re: [PATCH 1/4 v2] mac80211: Enable mesh security from userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 5, 2011 at 6:05 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> On Fri, 2011-03-04 at 17:24 -0800, Thomas Pedersen wrote:
>
>
>> +#define NL80211_MESH_SETUP_VENDOR_IE NL80211_MESH_SETUP_IE
>
>> -     NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE,
>> +     NL80211_MESH_SETUP_IE,
>> +     NL80211_MESH_SETUP_ENABLE_SECURITY,
>
> Clearly the intent was to be API compatible (ABI is guaranteed anyway),
> but that seems to not work this way since the names don't match.

Ouch, you are right.  Should have been
+#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
We'll send a fixup.

>> +     if (tb[NL80211_MESH_SETUP_IE]) {
>>               struct nlattr *ieattr =
>> -                     tb[NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE];
>> +                     tb[NL80211_MESH_SETUP_IE];
>>               if (!is_valid_ie_attr(ieattr))
>>                       return -EINVAL;
>> -             setup->vendor_ie = nla_data(ieattr);
>> -             setup->vendor_ie_len = nla_len(ieattr);
>> +             setup->ie = nla_data(ieattr);
>> +             setup->ie_len = nla_len(ieattr);
>> +             if (eid_in_ie_attr(ieattr, WLAN_EID_RSN))
>> +                     setup->is_secure =
>> +                     nla_get_flag(tb[NL80211_MESH_SETUP_ENABLE_SECURITY]);
>
> That last check seems a bit pointless -- I'd trust userspace (aka allow
> it to shoot itself in the foot) and not check that there's RSN
> information when it says it wants security -- maybe WAPI will come up
> with mesh security at some point ;-)

Enabling security without an RSN will result in mesh node that can't
communicate with anyone in the mesh, secured or not.   I prefer
keeping that check in place to avoid annoying misconfigurations.  You
still think it's pointless?  (In fact I was contemplating a more
strict check by returning EINVAL instead of ignoring the request when
userspace enables security and does not pass an RSN.)

-- 
Javier Cardona
cozybit Inc.
http://www.cozybit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux