Skip to contentSkip to conversation

iproute2 2.6.9-041019

ANNOUNCE Stephen Hemminger 5 participants 10 messages Oct 19, 2004 – Oct 21, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Now that 2.6.9 is final. Here is an update of the iproute2 utilities that contains
all the patches in my queue.

* lnstat to replace rtstat and ctstat (from Harald Welte)
* latest xfrm related changes
* several small typo's and build fixes for older systems

http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.9-041019.tar.gz
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 1 line · Stephen Hemminger

Now that 2.6.9 is final. Here is an update of the iproute2 utilities that

can't compile Got the following error. Linux is 2.6.9. Gcc is 2.95.3.

make[1]: Entering directory `/usr/src/net/iproute2-2.6.9/misc'
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include -DRESOLVE_HOSTNAMES -c -o ss.o ss.c
In file included from /usr/include/asm/byteorder.h:57,

                 from ss.c:36:

/usr/include/linux/byteorder/little_endian.h:43: parse error before __cpu_to_le64p' /usr/include/linux/byteorder/little_endian.h: In function __cpu_to_le64p':
/usr/include/linux/byteorder/little_endian.h:45: `__le64' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:45: (Each undeclared identifier is reported only once
...

a lot of these errors.

These errors went away if linux-2.4.28pre4 is used to compile.

Thanks,
Jeff.

#2 lore raw
Quoted 7 lines · Jeff Chua
Quoted 1 line · Stephen Hemminger

Now that 2.6.9 is final. Here is an update of the iproute2 utilities that

can't compile Got the following error. Linux is 2.6.9. Gcc is 2.95.3.

I'll take care of this. sorry fort he inconvenience.

Quoted 2 lines

Thanks,
Jeff.

Signature · 3 lines
- Harald Welte <[email protected]>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
#3 lore raw

iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019)

Quoted 1 line · Harald Welte

I'll take care of this. sorry fort he inconvenience.

I should actually read mails befor replying ;) I thought the bug was in lnstat - but apparently it wasn't.

The include bug seems non-trivial to fix. (how do I hate kernel include from userspace issues):

apparently __KERNEL_STRICT_NAMES is definde somewhere (glibc?) which prevents __le16, __le64 and others from being defined in linux/types.h.

Just reietting it like this doesn't help much:

ip/iptunnel.c +1 -0
diff -Nru iproute2-2.6.9-041019/ip/iptunnel.c iproute2-2.6.9-laf/ip/iptunnel.c
@@ -26,6 +26,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/ioctl.h>
+#undef __KERNEL_STRICT_NAMES
 #include <asm/byteorder.h>
 #include <linux/if.h>
 #include <linux/if_arp.h>

Since now we have conflicting definitions

gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include -DRESOLVE_HOSTNAMES -c -o iptunnel.o iptunnel.c
In file included from /usr/include/linux/byteorder/big_endian.h:11,

                 from /usr/include/asm/byteorder.h:74,
                 from iptunnel.c:30:

/usr/include/linux/types.h:20: error: conflicting types for fd_set' /usr/include/sys/select.h:78: error: previous declaration of fd_set' /usr/include/linux/types.h:21: error: conflicting types for dev_t' /usr/include/sys/types.h:62: error: previous declaration of dev_t' /usr/include/linux/types.h:24: error: conflicting types for nlink_t' /usr/include/sys/types.h:77: error: previous declaration of nlink_t'

I'm done with this, maybe somebody with more clue about kernel include magic will take on from this.

Additional issue: the iproute2 makefile didn't stop the build process
in the event of an error. Stephen, plase consider this patch to fix
it:

Makefile +5 -3
diff -Nru iproute2-2.6.9-041019/Makefile iproute2-2.6.9-laf/Makefile
@@ -29,10 +29,12 @@
 
 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
 
-all: Config
-	@for i in $(SUBDIRS); \
-	do $(MAKE) $(MFLAGS) -C $$i; done
+all: Config $(SUBDIRS)
 
+.PHONY: $(SUBDIRS)
+$(SUBDIRS):
+	$(MAKE) $(MFLAGS) -C $@;
+	
 Config:
 	./configure $(KERNEL_INCLUDE)
 
Signature · 3 lines
- Harald Welte <[email protected]>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
#4 lore raw

Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019)

Quoted 6 lines · Harald Welte
Quoted 1 line · Harald Welte

I'll take care of this. sorry fort he inconvenience.

I should actually read mails befor replying ;) I thought the bug was in lnstat - but apparently it wasn't.

Quoted 7 lines

The include bug seems non-trivial to fix. (how do I hate kernel include from userspace issues):

apparently __KERNEL_STRICT_NAMES is definde somewhere (glibc?) which prevents __le16, __le64 and others from being defined in linux/types.h.

Just reietting it like this doesn't help much:

No, it wouldn't.

The time has come to fix it properly instead. Anything which these tools actually need from the kernel headers should be moved into a separate header file (still in the kernel source) which is usable from _both_ kernel and userspace. It should use standard types (like uint16_t etc) instead of kernel-private types, and shouldn't have any #if{n,}def __KERNEL__ in it. Ideally, it would be in a different directory too -- but we can worry about that later.

Signature · 1 line
dwmw2
#5 lore raw

Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019)

Quoted 5 lines · David Woodhouse

The time has come to fix it properly instead. Anything which these tools actually need from the kernel headers should be moved into a separate header file (still in the kernel source) which is usable from _both_ kernel and userspace.

Isn't this what linux-libc-headers is for?

Quoted 1 line

It should use standard types (like uint16_t etc)

Why doesn't the kernel use these standard types also?

David Vrabel
--
David Vrabel, Design Engineer

Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/

#6 lore raw

Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019)

Quoted 8 lines · David Vrabel
Quoted 5 lines · David Woodhouse

The time has come to fix it properly instead. Anything which these tools actually need from the kernel headers should be moved into a separate header file (still in the kernel source) which is usable from _both_ kernel and userspace.

Isn't this what linux-libc-headers is for?

The separate linux-libc-headers is a hack, which will be able to die once we properly clean up the kernel headers into those which are 'exported' and those which are private.

Quoted 3 lines
Quoted 1 line

It should use standard types (like uint16_t etc)

Why doesn't the kernel use these standard types also?

Archaic personal preference. Inside the kernel that's fair enough.

Signature · 1 line
dwmw2
#8 lore raw

misc/ss.c line 37

Quoted 12 lines · Stephen Hemminger

Try this, ss was dragging in byteorder.h and it didn't need to.

diff -Nru a/misc/ss.c b/misc/ss.c

misc/ss.c +0 -1
@@ -33,7 +33,6 @@
 #include "libnetlink.h"
 #include "SNAPSHOT.h"
 
-#include <asm/byteorder.h>
 #include <linux/tcp.h>
 #include <linux/tcp_diag.h>

same problem.

"#include <linux/tcp.h>" is dragging in "#include <asm/byteorder.h>".

Same thing goes for <linux/ip.h>.

All these kernel headers need cleanup, and I don't know enough to fix it.

Jeff.

#9 lore raw
In reply to Jeff Chua

Similar problem to ss in iptunnel. It was including asm/byteorder.h a kernel header that it didn't need to.

ip/iptunnel.c +0 -1
diff -Nru a/ip/iptunnel.c b/ip/iptunnel.c
@@ -26,7 +26,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/ioctl.h>
-#include <asm/byteorder.h>
 #include <linux/if.h>
 #include <linux/if_arp.h>
 #include <linux/ip.h>

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/