[PATCH 1/1] Fix build of VLAN_NETLINK.

michael-dev michael-dev
Sat May 4 06:53:31 PDT 2013


Am 08.04.2013 22:40, schrieb Johannes Berg:
> On Mon, 2013-04-08 at 18:18 +0200, michael-dev at fami-braun.de wrote:
>> --- a/hostapd/Makefile
>> +++ b/hostapd/Makefile
>> @@ -129,6 +129,8 @@ ifdef CONFIG_FULL_DYNAMIC_VLAN
>>  OBJS += ../src/ap/vlan_util.o
>>  endif
>>  CFLAGS += -DCONFIG_VLAN_NETLINK
>> +CFLAGS += -I /usr/include/libnl3
>> +LIBS += -lnl-3 -lnl-genl-3 -lnl-route-3 -lnl-nf-3 -lnl-cli-3
> 
> That totally needs to be configurable, but there's probably already an
> option for it for nl80211.

The code enabled by this option already depends on libnl-3 headers and 
src/drivers/drivers.mk references /usr/include/libnl3 directly as well.
For example the code uses rtnl_link_set_type, which are undefined in 
libnl-1.1.3 and libnl2 (debian squeeze).

Would the following be better?

Regards,
  M. Braun

commit b4ef49518b9f534c5fe9ac0a1b0259dde8b25e17
Author: Michael Braun <michael-dev at fami-braun.de>
Date:   Mon Apr 8 11:58:23 2013 +0200

     Fix build of VLAN_NETLINK.

     Signed-hostap: Michael Braun <michael-dev at fami-braun.de>

diff --git a/hostapd/Makefile b/hostapd/Makefile
index 26cc2b5..a47be88 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -129,6 +129,16 @@ ifdef CONFIG_FULL_DYNAMIC_VLAN
  OBJS += ../src/ap/vlan_util.o
  endif
  CFLAGS += -DCONFIG_VLAN_NETLINK
+
+# no LIBNL-1, LIBNL-2 or LIBNL-TINY support
+ifdef CONFIG_LIBNL32
+  LIBS += -lnl-3
+  LIBS += -lnl-genl-3
+  LIBS += -lnl-route-3
+  LIBS += -lnl-nf-3
+  CFLAGS += -I/usr/include/libnl3
+endif
+
  endif
  endif

diff --git a/hostapd/defconfig b/hostapd/defconfig
index 317fe74..59f2742 100644
--- a/hostapd/defconfig
+++ b/hostapd/defconfig
@@ -170,6 +170,7 @@ CONFIG_IPV6=y
  # Use netlink-based kernel API for VLAN operations instead of ioctl()
  # Note: This requires libnl 3.1 or newer.
  #CONFIG_VLAN_NETLINK=y
+#CONFIG_LIBNL32=y

  # Remove support for dumping state into a file on SIGUSR1 signal
  # This can be used to reduce binary size at the cost of disabling a 
debugging




More information about the Hostap mailing list