diff mbox

Regression in hostap build using HS20 and proxyarp

Message ID 20141125144657.GA9409@w1.fi
State Superseded
Headers show

Commit Message

Jouni Malinen Nov. 25, 2014, 2:46 p.m. UTC
On Tue, Nov 25, 2014 at 02:32:31PM +0000, Peer, Ilan wrote:
> I tried building hwsim with the default example configuration files using the latest master, but this failed the hostapd compilation with the below error. 
> 
> I tried resolving this by moving includes, changing include order etc. without much success. Apparently this is a known issue (for example see http://www.redhat.com/archives/libvir-list/2013-January/msg01084.html)

Yeah, linux/*.h include in user space is often an issue..

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.

Comments

Ilan Peer Nov. 25, 2014, 2:54 p.m. UTC | #1
Hi Jouni,

This did the work :)

Thanks,

Ilan.

> -----Original Message-----
> From: hostap-bounces@lists.shmoo.com [mailto:hostap-
> bounces@lists.shmoo.com] On Behalf Of Jouni Malinen
> Sent: Tuesday, November 25, 2014 16:47
> To: hostap@lists.shmoo.com
> Subject: Re: Regression in hostap build using HS20 and proxyarp
> 
> On Tue, Nov 25, 2014 at 02:32:31PM +0000, Peer, Ilan wrote:
> > I tried building hwsim with the default example configuration files using the
> latest master, but this failed the hostapd compilation with the below error.
> >
> > I tried resolving this by moving includes, changing include order etc.
> > without much success. Apparently this is a known issue (for example
> > see
> > http://www.redhat.com/archives/libvir-list/2013-January/msg01084.html)
> 
> Yeah, linux/*.h include in user space is often an issue..
> 
> 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.
> 
> 
> diff --git a/src/ap/ndisc_snoop.c b/src/ap/ndisc_snoop.c index
> b6faeed..d397981 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)
> 
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP@lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
diff mbox

Patch

diff --git a/src/ap/ndisc_snoop.c b/src/ap/ndisc_snoop.c
index b6faeed..d397981 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)