Re: [PATCH 09/44] vlan: factor out bridge and ifconfig code

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

 



On Wed, Feb 24, 2016 at 12:53:15PM +0100, michael-dev@xxxxxxxxxxxxx wrote:
> This can be reused by 802.11r and RSN pre-auth.

> diff --git a/hostapd/Makefile b/hostapd/Makefile
> @@ -190,6 +190,19 @@ else
> +ifndef CONFIG_NO_VLAN
> +NEED_BRIDGE=y
> +NEED_IFCONFIG=y
> +endif
> +
> +ifdef NEED_BRIDGE
> +OBJS += ../src/ap/bridge.o
> +endif
> +
> +ifdef NEED_IFCONFIG
> +OBJS += ../src/ap/ifconfig.o
> +endif

This would pull in bridge.c and ifconfig.c to all builds by default.

> diff --git a/src/ap/bridge.c b/src/ap/bridge.c
> @@ -0,0 +1,253 @@
> +#include "utils/common.h"
> +#include <net/if.h>
> +#include <sys/ioctl.h>
> +#include <linux/sockios.h>
> +#include <linux/if_vlan.h>
> +#include <linux/if_bridge.h>

And that would try to include these Linux specific header files for
non-Linux targets like FreeBSD and NetBSD.. Same in ifconfig.c. This
would most likely break builds. These headers where within #ifdef
CONFIG_FULL_DYNAMIC_VLAN in vlan_init.c, but that was removed here. Lot
of the code in this bridge.c is likely to be specific to Linux only, so
something is needed to comment this out for non-Linux builds.

> diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c
> @@ -29,6 +29,13 @@
>  
>  #ifdef CONFIG_FULL_DYNAMIC_VLAN
>  
> +#include <net/if.h>
> +#include <sys/ioctl.h>
> +#include <linux/sockios.h>
> +#include <linux/if_vlan.h>
> +#include "bridge.h"
> +#include "ifconfig.h"

This would duplicate number of #includes just above the #ifdef line
here..

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



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

  Powered by Linux