All of lore.kernel.org
 help / color / mirror / Atom feed
* iproute2: Make linux/in6.h a stub?
@ 2015-04-25 20:54 Felix Janda
  2015-04-27 16:17 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Janda @ 2015-04-25 20:54 UTC (permalink / raw)
  To: netdev

Hello.

Background:
Current iproute2 does not build when the libc is musl instead of glibc.
This is because of redefinition of in6_addr in netinet/in.h and
linux/in6.h. There are workarounds in linux/libc-compat.h to make it
somehow work for glibc.


As I can see linux/in6.h is only indirectly used via the other kernel
headers linux/if_bridge.h and linux/xfrm.h. These in turn include
linux/in6.h only in order to get a declaration of in6_addr.

Since iproute2 depends on the fact that in6_addr is defined in
<netinet/in.h> it should be safe to replace the content of linux/in6.h
by

#include <netinet/in.h>

This completely removes the possibility for redefinition of in6_addr
for any libc. Since linux/in6.h is anyway a patched kernel header, such
a change should also not increase the work needed to sync with newer
kernel headers.

Would it be possible to implement such a change?

Felix

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iproute2: Make linux/in6.h a stub?
  2015-04-25 20:54 iproute2: Make linux/in6.h a stub? Felix Janda
@ 2015-04-27 16:17 ` Stephen Hemminger
  2015-04-29 17:36   ` Felix Janda
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2015-04-27 16:17 UTC (permalink / raw)
  To: Felix Janda; +Cc: netdev

On Sat, 25 Apr 2015 22:54:11 +0200
Felix Janda <felix.janda@posteo.de> wrote:

> Hello.
> 
> Background:
> Current iproute2 does not build when the libc is musl instead of glibc.
> This is because of redefinition of in6_addr in netinet/in.h and
> linux/in6.h. There are workarounds in linux/libc-compat.h to make it
> somehow work for glibc.
> 
> 
> As I can see linux/in6.h is only indirectly used via the other kernel
> headers linux/if_bridge.h and linux/xfrm.h. These in turn include
> linux/in6.h only in order to get a declaration of in6_addr.
> 
> Since iproute2 depends on the fact that in6_addr is defined in
> <netinet/in.h> it should be safe to replace the content of linux/in6.h
> by
> 
> #include <netinet/in.h>
> 
> This completely removes the possibility for redefinition of in6_addr
> for any libc. Since linux/in6.h is anyway a patched kernel header, such
> a change should also not increase the work needed to sync with newer
> kernel headers.
> 
> Would it be possible to implement such a change?
> 
> Felix

I appreciate the effort to make iproute2 in other environments.
The header files in linux for iproute2 are automatically generated
from the upstream kernel headers. A lot of effort has been done
to align kernel, iproute2 and glibc. Therefore doing something
special just to work around incompatibles with other
environments is not going to be accepted.

Any other libc has to be compatible with glibc in this area
rather than introducing more complexity in what is already fragile.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iproute2: Make linux/in6.h a stub?
  2015-04-27 16:17 ` Stephen Hemminger
@ 2015-04-29 17:36   ` Felix Janda
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Janda @ 2015-04-29 17:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Stephen Hemminger wrote:
> On Sat, 25 Apr 2015 22:54:11 +0200
> Felix Janda <felix.janda@posteo.de> wrote:
> 
> > Hello.
> > 
> > Background:
> > Current iproute2 does not build when the libc is musl instead of glibc.
> > This is because of redefinition of in6_addr in netinet/in.h and
> > linux/in6.h. There are workarounds in linux/libc-compat.h to make it
> > somehow work for glibc.
> > 
> > 
> > As I can see linux/in6.h is only indirectly used via the other kernel
> > headers linux/if_bridge.h and linux/xfrm.h. These in turn include
> > linux/in6.h only in order to get a declaration of in6_addr.
> > 
> > Since iproute2 depends on the fact that in6_addr is defined in
> > <netinet/in.h> it should be safe to replace the content of linux/in6.h
> > by
> > 
> > #include <netinet/in.h>
> > 
> > This completely removes the possibility for redefinition of in6_addr
> > for any libc. Since linux/in6.h is anyway a patched kernel header, such
> > a change should also not increase the work needed to sync with newer
> > kernel headers.
> > 
> > Would it be possible to implement such a change?
> > 
> > Felix
> 
> I appreciate the effort to make iproute2 in other environments.
> The header files in linux for iproute2 are automatically generated
> from the upstream kernel headers. A lot of effort has been done
> to align kernel, iproute2 and glibc. Therefore doing something
> special just to work around incompatibles with other
> environments is not going to be accepted.
> 
> Any other libc has to be compatible with glibc in this area
> rather than introducing more complexity in what is already fragile.

Thanks for your consideration. I see that you want to stay as close to
upstream kernel headers as possible and cannot argue against that. So
in order of not having to patch iproute2 it will be necessary to get
fixes to the upstream kernel headers.

Felix

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-29 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-25 20:54 iproute2: Make linux/in6.h a stub? Felix Janda
2015-04-27 16:17 ` Stephen Hemminger
2015-04-29 17:36   ` Felix Janda

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.