* iproute2 build error due to sr-ipv6 lwtunnel
@ 2017-05-04 9:13 Daniel Borkmann
2017-05-04 9:28 ` David Lebrun
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2017-05-04 9:13 UTC (permalink / raw)
To: david.lebrun; +Cc: netdev, stephen
Hi David,
I'm getting the following build error from e8493916a8ed ("iproute:
add support for SR-IPv6 lwtunnel encapsulation"). Reverting your
commit makes iproute2 build again for me. Please take a look.
[...]
CC iplink_vrf.o
CC iproute_lwtunnel.o
In file included from ../include/linux/seg6.h:18:0,
from iproute_lwtunnel.c:26:
../include/linux/in6.h:131:26: error: expected identifier before numeric constant
#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
^
In file included from /usr/include/resolv.h:57:0,
from ../include/utils.h:6,
from iproute_lwtunnel.c:32:
/usr/include/netinet/in.h:196:8: error: redefinition of ‘struct in6_addr’
struct in6_addr
^
In file included from ../include/linux/seg6.h:18:0,
from iproute_lwtunnel.c:26:
../include/linux/in6.h:32:8: note: originally defined here
struct in6_addr {
^
In file included from /usr/include/resolv.h:57:0,
from ../include/utils.h:6,
from iproute_lwtunnel.c:32:
/usr/include/netinet/in.h:237:8: error: redefinition of ‘struct sockaddr_in6’
struct sockaddr_in6
^
In file included from ../include/linux/seg6.h:18:0,
from iproute_lwtunnel.c:26:
../include/linux/in6.h:49:8: note: originally defined here
struct sockaddr_in6 {
^
In file included from /usr/include/resolv.h:57:0,
from ../include/utils.h:6,
from iproute_lwtunnel.c:32:
/usr/include/netinet/in.h:273:8: error: redefinition of ‘struct ipv6_mreq’
struct ipv6_mreq
^
In file included from ../include/linux/seg6.h:18:0,
from iproute_lwtunnel.c:26:
../include/linux/in6.h:59:8: note: originally defined here
struct ipv6_mreq {
^
iproute_lwtunnel.c: In function ‘parse_encap_seg6’:
iproute_lwtunnel.c:375:3: warning: passing argument 3 of ‘inet_get_addr’ from incompatible pointer type [enabled by default]
inet_get_addr(s, NULL, &srh->segments[i]);
^
In file included from iproute_lwtunnel.c:32:0:
../include/utils.h:241:5: note: expected ‘struct in6_addr *’ but argument is of type ‘struct in6_addr *’
int inet_get_addr(const char *src, __u32 *dst, struct in6_addr *dst6);
^
make[1]: *** [iproute_lwtunnel.o] Error 1
make: *** [all] Error 2
[root@localhost iproute]#
Thanks,
Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-04 9:13 iproute2 build error due to sr-ipv6 lwtunnel Daniel Borkmann
@ 2017-05-04 9:28 ` David Lebrun
2017-05-04 9:55 ` Daniel Borkmann
0 siblings, 1 reply; 7+ messages in thread
From: David Lebrun @ 2017-05-04 9:28 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: netdev, stephen
[-- Attachment #1.1: Type: text/plain, Size: 868 bytes --]
On 05/04/2017 11:13 AM, Daniel Borkmann wrote:
> Hi David,
>
> I'm getting the following build error from e8493916a8ed ("iproute:
> add support for SR-IPv6 lwtunnel encapsulation"). Reverting your
> commit makes iproute2 build again for me. Please take a look.
Hi Daniel,
This is because linux/seg6.h does an include of linux/in6.h (cf kernel
commit ea3ebc73b46fbdb049dafd47543bb22efaa09c8e "uapi: fix linux/seg6.h
and linux/seg6_iptunnel.h userspace compilation errors"), and iproute2's
include/utils.h requires the system /usr/include/resolv.h, which itself
includes /usr/include/netinet/in.h, re-defining struct in6_addr.
However, netinet/in.h protects some struct definitions with #ifndef
__USE_KERNEL_IPV6_DEFS, which is explicitly defined in
iproute_lwtunnel.c, thus avoiding this specific issue.
What is your glibc version ?
David
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-04 9:28 ` David Lebrun
@ 2017-05-04 9:55 ` Daniel Borkmann
2017-05-14 13:26 ` Daniel Borkmann
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2017-05-04 9:55 UTC (permalink / raw)
To: David Lebrun; +Cc: netdev, stephen
On 05/04/2017 11:28 AM, David Lebrun wrote:
> On 05/04/2017 11:13 AM, Daniel Borkmann wrote:
>> Hi David,
>>
>> I'm getting the following build error from e8493916a8ed ("iproute:
>> add support for SR-IPv6 lwtunnel encapsulation"). Reverting your
>> commit makes iproute2 build again for me. Please take a look.
>
> Hi Daniel,
>
> This is because linux/seg6.h does an include of linux/in6.h (cf kernel
> commit ea3ebc73b46fbdb049dafd47543bb22efaa09c8e "uapi: fix linux/seg6.h
> and linux/seg6_iptunnel.h userspace compilation errors"), and iproute2's
> include/utils.h requires the system /usr/include/resolv.h, which itself
> includes /usr/include/netinet/in.h, re-defining struct in6_addr.
>
> However, netinet/in.h protects some struct definitions with #ifndef
> __USE_KERNEL_IPV6_DEFS, which is explicitly defined in
> iproute_lwtunnel.c, thus avoiding this specific issue.
>
> What is your glibc version ?
Ok, I see, on one of my machines I have an old user space, but
latest net/net-next kernel (+ installed kernel headers) and
iproute2. glibc version there is 2.18.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-04 9:55 ` Daniel Borkmann
@ 2017-05-14 13:26 ` Daniel Borkmann
2017-05-15 7:56 ` David Lebrun
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2017-05-14 13:26 UTC (permalink / raw)
To: David Lebrun; +Cc: netdev, stephen
On 05/04/2017 11:55 AM, Daniel Borkmann wrote:
> On 05/04/2017 11:28 AM, David Lebrun wrote:
>> On 05/04/2017 11:13 AM, Daniel Borkmann wrote:
>>> Hi David,
>>>
>>> I'm getting the following build error from e8493916a8ed ("iproute:
>>> add support for SR-IPv6 lwtunnel encapsulation"). Reverting your
>>> commit makes iproute2 build again for me. Please take a look.
>>
>> Hi Daniel,
>>
>> This is because linux/seg6.h does an include of linux/in6.h (cf kernel
>> commit ea3ebc73b46fbdb049dafd47543bb22efaa09c8e "uapi: fix linux/seg6.h
>> and linux/seg6_iptunnel.h userspace compilation errors"), and iproute2's
>> include/utils.h requires the system /usr/include/resolv.h, which itself
>> includes /usr/include/netinet/in.h, re-defining struct in6_addr.
>>
>> However, netinet/in.h protects some struct definitions with #ifndef
>> __USE_KERNEL_IPV6_DEFS, which is explicitly defined in
>> iproute_lwtunnel.c, thus avoiding this specific issue.
>>
>> What is your glibc version ?
>
> Ok, I see, on one of my machines I have an old user space, but
> latest net/net-next kernel (+ installed kernel headers) and
> iproute2. glibc version there is 2.18.
David, are you still looking into fixing this?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-14 13:26 ` Daniel Borkmann
@ 2017-05-15 7:56 ` David Lebrun
2017-05-15 8:46 ` Daniel Borkmann
2017-05-15 15:24 ` Stephen Hemminger
0 siblings, 2 replies; 7+ messages in thread
From: David Lebrun @ 2017-05-15 7:56 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: netdev, stephen
[-- Attachment #1.1: Type: text/plain, Size: 990 bytes --]
On 05/14/2017 03:26 PM, Daniel Borkmann wrote:
>
> David, are you still looking into fixing this?
Sorry, I left the issue on the side and then forgot about it.
Could you try the following iproute2 patch ? Thanks
diff --git a/include/linux/seg6.h b/include/linux/seg6.h
index 0715279..dd28017 100644
--- a/include/linux/seg6.h
+++ b/include/linux/seg6.h
@@ -15,7 +15,12 @@
#define _LINUX_SEG6_H
#include <linux/types.h>
+
+#ifdef __KERNEL__
#include <linux/in6.h> /* For struct in6_addr. */
+#else
+#include <netinet/in.h>
+#endif
/*
* SRH
diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
index 1395f03..434e60a 100644
--- a/ip/iproute_lwtunnel.c
+++ b/ip/iproute_lwtunnel.c
@@ -20,9 +20,6 @@
#include <linux/lwtunnel.h>
#include <linux/mpls_iptunnel.h>
-#ifndef __USE_KERNEL_IPV6_DEFS
-#define __USE_KERNEL_IPV6_DEFS
-#endif
#include <linux/seg6.h>
#include <linux/seg6_iptunnel.h>
#include <linux/seg6_hmac.h>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-15 7:56 ` David Lebrun
@ 2017-05-15 8:46 ` Daniel Borkmann
2017-05-15 15:24 ` Stephen Hemminger
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2017-05-15 8:46 UTC (permalink / raw)
To: David Lebrun; +Cc: netdev, stephen
On 05/15/2017 09:56 AM, David Lebrun wrote:
> On 05/14/2017 03:26 PM, Daniel Borkmann wrote:
>>
>> David, are you still looking into fixing this?
>
> Sorry, I left the issue on the side and then forgot about it.
>
> Could you try the following iproute2 patch ? Thanks
Yep, that compiles fine for me, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: iproute2 build error due to sr-ipv6 lwtunnel
2017-05-15 7:56 ` David Lebrun
2017-05-15 8:46 ` Daniel Borkmann
@ 2017-05-15 15:24 ` Stephen Hemminger
1 sibling, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2017-05-15 15:24 UTC (permalink / raw)
To: David Lebrun; +Cc: Daniel Borkmann, netdev
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
On Mon, 15 May 2017 09:56:18 +0200
David Lebrun <david.lebrun@uclouvain.be> wrote:
> On 05/14/2017 03:26 PM, Daniel Borkmann wrote:
> >
> > David, are you still looking into fixing this?
>
> Sorry, I left the issue on the side and then forgot about it.
>
> Could you try the following iproute2 patch ? Thanks
The headers in iproute2 come from kernel headers.
Any changes need to be done upstream in kernel.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-15 15:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 9:13 iproute2 build error due to sr-ipv6 lwtunnel Daniel Borkmann
2017-05-04 9:28 ` David Lebrun
2017-05-04 9:55 ` Daniel Borkmann
2017-05-14 13:26 ` Daniel Borkmann
2017-05-15 7:56 ` David Lebrun
2017-05-15 8:46 ` Daniel Borkmann
2017-05-15 15:24 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.