lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Jan 2017 14:08:06 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Ben Greear <greearb@...delatech.com>
Cc:     netdev <netdev@...r.kernel.org>, mikko.rapeli@....fi
Subject: Re: Commit 1fe8e0... (include more headers in if_tunnel.h) breaks
 my user-space build.

On Fri, 13 Jan 2017 11:50:32 -0800
Ben Greear <greearb@...delatech.com> wrote:

> On 01/13/2017 11:41 AM, Stephen Hemminger wrote:
> > On Fri, 13 Jan 2017 11:12:32 -0800
> > Ben Greear <greearb@...delatech.com> wrote:
> >  
> >> I am including netinet/ip.h, and also linux/if_tunnel.h, and the linux/ip.h conflicts with
> >> netinet/ip.h.
> >>
> >> Maybe my build environment is screwed up, but maybe also it would be better to
> >> just let the user include appropriate headers before including if_tunnel.h
> >> and revert this patch?
> >>
> >>
> >> include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h
> >>
> >>      Fixes userspace compilation errors like:
> >>
> >>      error: field ‘iph’ has incomplete type
> >>      error: field ‘prefix’ has incomplete type
> >>
> >>      Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
> >>      Signed-off-by: David S. Miller <davem@...emloft.net>
> >>
> >> Thanks,
> >> Ben
> >>  
> >
> > What I ended up doing for iproute2 was including all headers used by the source
> > based on sanitized kernel headers.  Basically
> >   $ git grep '^#include <linux/' | \
> > 	awk -F: '{print $2}' | \
> > 	sed -e 's/^#include <//' -e 's/>.*$//' | \
> > 	sort -u >linux.headers
> >    $ for f in $(cat linux.headers)
> >      do cp ~/kernel/net-next/usr/include/$f include/$f
> >      done
> >
> > You can't take only some of the headers, once you decide to diverge from glibc provided
> > headers, you got to take them all.
> >  
> 
> I do grab a copy of the linux kernel headers and compile against that, but netinet/ip.h is
> coming from the OS.  Do you mean I should not include netinet/ip.h and instead use linux/ip.h?

I don't think you can mix netinet/ip.h and linux/ip.h, yes that is a mess.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ