Regression in hostap build using HS20 and proxyarp
Jouni Malinen
j
Tue Nov 25 06:53:12 PST 2014
On Tue, Nov 25, 2014 at 04:46:57PM +0200, Jouni Malinen wrote:
> Does this work for you? I guess I could also make IPv6 ProxyARP things
> conditional on CONFIG_IPV6=y to make it easier to work around this on
> systems that do not have suitable IPv6 header files.
A more complete set would do both those and IPv4 as well. I'll probably
commit something like this if this compiles on my test systems without
issues.
diff --git a/hostapd/Makefile b/hostapd/Makefile
index aeea289..74cd9fa 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -855,8 +855,10 @@ ifdef CONFIG_PROXYARP
CFLAGS += -DCONFIG_PROXYARP
OBJS += ../src/ap/x_snoop.o
OBJS += ../src/ap/dhcp_snoop.o
+ifdef CONFIG_IPV6
OBJS += ../src/ap/ndisc_snoop.o
endif
+endif
OBJS += ../src/drivers/driver_common.o
diff --git a/src/ap/dhcp_snoop.c b/src/ap/dhcp_snoop.c
index 0b8f92a..703a599 100644
--- a/src/ap/dhcp_snoop.c
+++ b/src/ap/dhcp_snoop.c
@@ -7,8 +7,8 @@
*/
#include "utils/includes.h"
-#include <linux/ip.h>
-#include <linux/udp.h>
+#include <netinet/ip.h>
+#include <netinet/udp.h>
#include "utils/common.h"
#include "l2_packet/l2_packet.h"
diff --git a/src/ap/ndisc_snoop.c b/src/ap/ndisc_snoop.c
index b6faeed..b29cc70 100644
--- a/src/ap/ndisc_snoop.c
+++ b/src/ap/ndisc_snoop.c
@@ -7,8 +7,8 @@
*/
#include "utils/includes.h"
-#include <linux/ipv6.h>
-#include <linux/icmpv6.h>
+#include <netinet/ip6.h>
+#include <netinet/icmp6.h>
#include "utils/common.h"
#include "l2_packet/l2_packet.h"
@@ -24,8 +24,8 @@ struct ip6addr {
};
struct icmpv6_ndmsg {
- struct ipv6hdr ipv6h;
- struct icmp6hdr icmp6h;
+ struct ip6_hdr ipv6h;
+ struct icmp6_hdr icmp6h;
struct in6_addr target_addr;
u8 opt_type;
u8 len;
@@ -98,7 +98,7 @@ static void handle_ndisc(void *ctx, const u8 *src_addr, const u8 *buf,
if (msg->opt_type != SOURCE_LL_ADDR)
return;
- saddr = &msg->ipv6h.saddr;
+ saddr = &msg->ipv6h.ip6_src;
if (!(saddr->s6_addr32[0] == 0 && saddr->s6_addr32[1] == 0 &&
saddr->s6_addr32[2] == 0 && saddr->s6_addr32[3] == 0)) {
if (len < ETH_HLEN + sizeof(*msg) + ETH_ALEN)
diff --git a/src/ap/ndisc_snoop.h b/src/ap/ndisc_snoop.h
index 9217756..3cc9a55 100644
--- a/src/ap/ndisc_snoop.h
+++ b/src/ap/ndisc_snoop.h
@@ -9,13 +9,13 @@
#ifndef NDISC_SNOOP_H
#define NDISC_SNOOP_H
-#ifdef CONFIG_PROXYARP
+#if defined(CONFIG_PROXYARP) && defined(CONFIG_IPV6)
int ndisc_snoop_init(struct hostapd_data *hapd);
void ndisc_snoop_deinit(struct hostapd_data *hapd);
void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta);
-#else /* CONFIG_PROXYARP */
+#else /* CONFIG_PROXYARP && CONFIG_IPV6 */
static inline int ndisc_snoop_init(struct hostapd_data *hapd)
{
@@ -31,6 +31,6 @@ static inline void sta_ip6addr_del(struct hostapd_data *hapd,
{
}
-#endif /* CONFIG_PROXYARP */
+#endif /* CONFIG_PROXYARP && CONFIG_IPV6 */
#endif /* NDISC_SNOOP_H */
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list