Hi Denys,
Thanks for looking into this.
But unfortunately, even the net-tools one that one seem to be failing.
Please see the attached logs.
Thanks,
Sreen
-----Original Message-----
From: Denys Vlasenko [mailto:[email protected]]
Sent: Friday, March 13, 2009 4:57 PM
To: Tallam, Sreenivas; [email protected]
Subject: Re: udhcpc failure - route: SIOCADDRT: Invalid argument
On Friday 13 March 2009 10:26:14 pm Tallam, Sreenivas wrote:
> Hi Denys,
>
> Looks like I narrowed it down to the line of code that is throwing
> this error.
> So I moved the /usr/share/udhcpc/default.script to the one that I had.
> ( the original one!!)
>
> And I recompiled the busybox with more debug statements within
> networking/ifupdown.c So I added debug_noise under execute() command
...
> Configuring interface eth0 (inet6)
> OUT: ifconfig eth0 up
> OUT: ifconfig eth0 add fd20:8b1e:b255:202::1234/64
> OUT: route -A inet6 add ::/0 gw fd20:8b1e:b255:202::1
>
> ifup: don't seem to have all the variables for eth0/inet6
>
> And with this failure, I ran the command, on the command line
> directly, to see the same failure
>
> # route -A inet6 add ::/0 gw fd20:8b1e:b255:202::1
> route: SIOCADDRT: Invalid argument
> #
>
> So the failing command is under networking/ifupdown.c --> static_up6
> --
> > "route -A inet6 add ::/0 gw %gateway%"
Looks like you have static IPv6 configuration.
route command looks correct too, but it doesn't seem to succeed.
Looks like busybox's route applet is buggy.
Please do the following:
run "strace -o bb_route.log route -A inet6 add ::/0 gw
fd20:8b1e:b255:202::1"
and send me the log;
build (or take from other system) "standard" route (for example, one
from net-tools 1.60) and collect the same info from it:
strace -o std_route.log route_from_nettools -A inet6 add ::/0 gw
fd20:8b1e:b255:202::1
--
vda
# /sbin/route --version
/sbin/route: unrecognized option `--version'
BusyBox v1.10.2 (2009-03-03 16:51:05 PST) multi-call binary
Usage: route [{add|del|delete}]
Edit the kernel's routing tables
Options:
-n Dont resolve names
-e Display other/more information
-A inet{6} Select address family
#
#
# which route
/sbin/route
# ls -l /sbin/route
lrwxrwxrwx 1 root root 14 Jan 1 1970 /sbin/route ->
../bin/busybox
#
# strace -o bb_route.log route -A inet6 add ::/0 gw fd20:8b1e:b255:202::1
route: SIOCADDRT: Invalid argument
#
#
# cat bb_route.log
execve("/sbin/route", ["route", "-A", "inet6", "add", "::/0", "gw",
"fd20:8b1e:b255:202::1"], [/* 7 vars */]) = 0
brk(0) = 0x10072000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/ppc405/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls/ppc405", 0x7f8b41a8) = -1 ENOENT (No such file or directory)
open("/lib/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0x7f8b41a8) = -1 ENOENT (No such file or directory)
open("/lib/ppc405/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/ppc405", 0x7f8b41a8) = -1 ENOENT (No such file or directory)
open("/lib/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\7"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=26768, ...}) = 0
mmap(0xffaf000, 264088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xffaf000
mprotect(0xffb5000, 61440, PROT_NONE) = 0
mmap(0xffc4000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0xffc4000
mmap(0xffc6000, 169880, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffc6000
close(3) = 0
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\4"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=34040, ...}) = 0
mmap(0xff86000, 98456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xff86000
mprotect(0xff8e000, 61440, PROT_NONE) = 0
mmap(0xff9d000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0xff9d000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\346"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1479512, ...}) = 0
mmap(0xfe0e000, 1470840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0xfe0e000
mprotect(0xff5f000, 61440, PROT_NONE) = 0
mmap(0xff6e000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x150000) = 0xff6e000
mmap(0xff73000, 8568, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff73000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001f000
mprotect(0xff6e000, 4096, PROT_READ) = 0
mprotect(0xff9d000, 4096, PROT_READ) = 0
mprotect(0xffc4000, 4096, PROT_READ) = 0
getpid() = 5185
socket(PF_NETLINK, SOCK_RAW, 0) = 3
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=5185, groups=00000000}, [12]) = 0
time(NULL) = 1236983841
sendto(3, "\0\0\0\24\0\26\3\1I\272\340!\0\0\0\0\0\0\0\0", 20, 0,
{sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\0\0D\0\24\0\2I\272\340!\0\0\24A\2\23\200\0\0\0\0\1\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 128
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\...@\0\24\0\2i\272\340!\0\0\24a\n@\0\0\0\0\0\1\0\24"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 256
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\0\0\24\0\3\0\2I\272\340!\0\0\24A\0\0\0\0\0\0\0\1\0\24"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(3) = 0
brk(0) = 0x10072000
brk(0x10093000) = 0x10093000
socket(PF_NETLINK, SOCK_RAW, 0) = 3
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=5185, groups=00000000}, [12]) = 0
time(NULL) = 1236983841
sendto(3, "\0\0\0\24\0\26\3\1I\272\340!\0\0\0\0\0\0\0\0", 20, 0,
{sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\0\0D\0\24\0\2I\272\340!\0\0\24A\2\23\200\0\0\0\0\1\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 128
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\...@\0\24\0\2i\272\340!\0\0\24a\n@\0\0\0\0\0\1\0\24"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 256
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
msg_iov(1)=[{"\0\0\0\24\0\3\0\2I\272\340!\0\0\24A\0\0\0\0\0\0\0\1\0\24"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(3) = 0
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, SIOCADDRT, 0x7f8b49a0) = -1 EINVAL (Invalid argument)
write(2, "route: SIOCADDRT: Invalid argume"..., 35) = 35
exit_group(1) = ?
# /sbin/route --version
net-tools 1.60
route 1.98 (2001-04-15)
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE
HW: +ETHER +ARC +SLIP +PPP +TUNNEL +TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT
+FDDI +HIPPI +HDLC/LAPB -EUI64
#
#
# which route
/sbin/route
#
# ls -l /sbin/route
-rwxr-xr-x 1 root root 47508 Mar 13 22:41 /sbin/route
#
#
# strace -o std_route.log route -A inet6 add ::/0 gw fd20:8b1e:b255:202::1
SIOCADDRT: Invalid argument
#
#
# cat std_route.log
execve("/sbin/route", ["route", "-A", "inet6", "add", "::/0", "gw",
"fd20:8b1e:b255:202::1"], [/* 7 vars */]) = 0
brk(0) = 0x1001c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/ppc405/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls/ppc405", 0x7f8e91a8) = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0x7f8e91a8) = -1 ENOENT (No such file or directory)
open("/lib/ppc405/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/ppc405", 0x7f8e91a8) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\346"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1479512, ...}) = 0
mmap(0xfe88000, 1470840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0xfe88000
mprotect(0xffd9000, 61440, PROT_NONE) = 0
mmap(0xffe8000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x150000) = 0xffe8000
mmap(0xffed000, 8568, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffed000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001e000
mprotect(0xffe8000, 4096, PROT_READ) = 0
brk(0) = 0x1001c000
brk(0x1003d000) = 0x1003d000
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, SIOCADDRT, 0x7f8e9860) = -1 EINVAL (Invalid argument)
dup(2) = 4
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(4, {st_mode=S_IFCHR|0660, st_rdev=makedev(4, 65), ...}) = 0
ioctl(4, TCGETS or TCGETS, {B9600 opost isig icanon echo ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001f000
_llseek(4, 0, 0x7f8e9728, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(4, "SIOCADDRT: Invalid argument\n", 28) = 28
close(4) = 0
munmap(0x3001f000, 4096) = 0
close(3) = 0
exit_group(7) = ?
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox