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:	Thu, 7 Jan 2016 09:29:50 +0200
From:	Mikko Rapeli <mikko.rapeli@....fi>
To:	Stephen Hemminger <shemming@...cade.com>
Cc:	Pablo Neira Ayuso <pablo@...filter.org>, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org
Subject: Re: header conflict introduced by change to
 netfilter_ipv4/ip_tables.h

On Wed, Jan 06, 2016 at 09:20:07AM -0800, Stephen Hemminger wrote:
> This commit breaks compilation of iproute2 with net-next.

Ok, linux/if.h and libc net/if.h have overlapping defines, and this is not
the only one. I saw lots of them in the core dump headers.

How should we handle them? Another ifndef for IFNAMSIZ into kernel uapi
headers?

-Mikko

> commit 1ffad83dffd675cd742286ae82dca7d746cb0da8
> Author: Mikko Rapeli <mikko.rapeli@....fi>
> Date:   Thu Oct 15 07:56:30 2015 +0200
> 
>     netfilter: fix include files for compilation
>     
>     Add missing header dependencies and other small changes so that each file
>     compiles alone in userspace.
>     
>     Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
>     Signed-off-by: Pablo Neira Ayuso <pablo@...filter.org>
> 
> For iproute2, a copy of kernel headers (from make install_headers) is used.
> After this change. the build of x_tables.c fails because IFNAMSIZ is already
> defined in net/if.h
> 
> gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -DHAVE_SETNS -DHAVE_ELF -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\" -DYY_NO_INPUT -Wl,-export-dynamic -shared -fpic -o q_atm.so q_atm.c -latm
> gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -DHAVE_SETNS -DHAVE_ELF -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\" -DYY_NO_INPUT -Wl,-export-dynamic -shared -fpic -o m_xt.so m_xt.c $(pkg-config xtables --cflags --libs)
> In file included from ../include/linux/netfilter_ipv4/ip_tables.h:20:0,
>                  from m_xt.c:20:
> ../include/linux/if.h:26:0: warning: "IFNAMSIZ" redefined
>  #define IFNAMSIZ 16
>  ^
> In file included from m_xt.c:17:0:
> /usr/include/net/if.h:129:0: note: this is the location of the previous definition
>  # define IFNAMSIZ IF_NAMESIZE
>  ^
> ../include/linux/if.h:71:2: error: redeclaration of enumerator ‘IFF_UP’
>   IFF_UP    = 1<<0,  /* sysfs */
>   ^
> /usr/include/net/if.h:44:5: note: previous definition of ‘IFF_UP’ was here
>      IFF_UP = 0x1,  /* Interface is up.  */
>      ^
> ../include/linux/if.h:72:2: error: redeclaration of enumerator ‘IFF_BROADCAST’
>   IFF_BROADCAST   = 1<<1,  /* __volatile__ */
>   ^
> /usr/include/net/if.h:46:5: note: previous definition of ‘IFF_BROADCAST’ was here
>      IFF_BROADCAST = 0x2, /* Broadcast address valid.  */
>      ^
> ../include/linux/if.h:73:2: error: redeclaration of enumerator ‘IFF_DEBUG’
>   IFF_DEBUG   = 1<<2,  /* sysfs */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ