[PATCH 00/13] refactor wired drivers code and add macsec_linux driver

Sabrina Dubroca sd at queasysnail.net
Mon Dec 12 06:49:36 PST 2016

2016-11-30, 20:19:49 +0200, Jouni Malinen wrote:
> On Sun, Nov 27, 2016 at 08:08:43PM +0100, Sabrina Dubroca wrote:
> > This patchset refactors the common parts of wired drivers code into a
> > shared file, so that they can be reused by other drivers. The
> > macsec_qca driver already contains a lot of code duplication from the
> > wired driver, and the macsec_linux driver would do the same. A
> > structure to hold data common to all wired drivers is added and used
> > in all these drivers. This refactoring has been split into multiple
> > patches to make review a bit easier.
> > 
> > Then, the new macsec_linux driver is introduced.
> > 
> > The last patch is a small cleanup of the default configuration file.
> > 
> > Sabrina Dubroca (13):
> >   drivers: move common definitions for wired drivers out
> >   drivers: move wired_multicast_membership to common file
> >   drivers: move driver_wired_multi to a common file
> >   drivers: move driver_wired_get_ifflags to a common file
> >   drivers: move driver_wired_set_ifflags to a common file
> >   drivers: move driver_wired_get_ifstatus to a common file
> >   drivers: move driver_wired_init_common to a common file
> >   drivers: move driver_wired_deinit_common to a common file
> >   drivers: move driver_wired_get_capa to a common file
> >   drivers: move driver_wired_get_bssid to a common file
> >   drivers: move driver_wired_get_ssid to a common file
> >   drivers: macsec_linux: add driver for macsec on linux kernels
> >   mka: remove references to macsec_qca from wpa_supplicant.conf
> Thanks, applied with some cleanup.
> Please note that it was a bit inconvenient to build
> src/drivers/driver_macsec_linux.c with the current libnl snapshot (and
> no release has macsec support included yet).

Hmm, libnl3 3.2.28 was released in August with macsec support.

> I had to add "enum macsec_validation_type;"
> to netlink/route/link/macsec.h to allow
> compilation to pass without warnings. That enum is defined in a private
> libnl header but referenced here in a public header file and some
> compilers will complain about that.. That should really be fixed in
> libnl.

The public libnl header includes the kernel uapi header
linux/if_link.h, which provides this enum.

> Requirement for the recent kernel include/uapi/linux/if_macsec.h is also
> making this a bit inconvenient since that is not really included in most
> distributions as normal linux/* headers for user space.. Anyway, I guess
> this one will get resolved in due time once distributions update their
> kernels and a new kernel is going to be needed for MACsec
> functionality regardless..

I would think distributions that don't provide the kernel module won't
enable this.

I suppose we could add a libnl version check to the Makefile, and
check that all necessary headers are present, before starting the
actual compile.

    ls /usr/include/linux/if_macsec.h 2> /dev/null > /dev/null || echo woops
    pkg-config --atleast-version=3.2.28 libnl-route-3.0        || echo woops


More information about the Hostap mailing list