[PATCH] BSD: Use struct ip rather than struct iphdr

Jouni Malinen j at w1.fi
Sat Sep 21 03:48:07 PDT 2019

On Thu, Sep 19, 2019 at 11:08:46AM +0100, Roy Marples wrote:
>     As we define __FAVOR_BSD use the BSD IP header.
>     Compile tested on NetBSD, DragonFlyBSD and Linux.

> diff --git a/src/common/dhcp.h b/src/common/dhcp.h
>  struct bootp_pkt {
> -       struct iphdr iph;
> +       struct ip iph;

That breaks hostapd build on Linux:

../src/ap/dhcp_snoop.c: In function ‘handle_dhcp’:
../src/ap/dhcp_snoop.c:49:25: error: ‘const struct ip’ has no member named ‘tot_len’; did you mean ‘ip_len’?
  tot_len = ntohs(b->iph.tot_len);

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list