Search Linux Wireless

Re: [PATCH] iw: use nl80211 for phy_lookup function

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

 



On Mon, 2013-09-30 at 11:44 +0200, Javier Lopez wrote:
> Original implementation uses sysfs to get dev index from
> dev name. Due the changes on netns and sysfs iw is broken
> if using multiple network namespaces. iw works properly
> if using it from the main namespace, but it won't work if
> using from the new namespace.
> 
> Kernel commit 3ff195b0, "sysfs: Implement sysfs tagged
> directory support" patch, added a filtering mechanism
> to sysfs, allowing sysfs directories to look different
> depending on the context where they are being observed.
> 
> When an interface is moved to another namespace, the
> interface dissapears from sysfs structure. In order
> to recover access to the directory a solution is to
> remount sysfs from the correct context. This will force
> the user to remount sysfs before using iw from a
> different namespace.
> 
> To avoid this issue we can use nl80211 (using
> NL80211_CMD_GET_WIPHY command) this returns the list of
> phys, then process the list, find the device and return
> the device index.

This seems a bit workaround-ish/hack-ish to me. Why would a remount be
necessary? Can't sysfs look at the process tags when determining the
access? Should we maybe do something in our sysfs code in the kernel for
this?

johannes

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux