udhcpc failure - route: SIOCADDRT: Invalid argument

Tallam, Sreenivas Sreenivas.Tallam at netapp.com
Thu Mar 12 17:28:50 UTC 2009


Hi Denys,

Thanks for the reply.
I have captured the logs as you requested them.

Please find the attach for 2 scenarios.
1. UDHCPC default script modified with your changes + DHCPv4 + IPv6
2  UDHCPC default script modified with your changes + DHCPv4 ( No IPv6)

Please let me know if I can provide you with more information.

Thanks,
Sreen 

-----Original Message-----
From: Denys Vlasenko [mailto:vda.linux at googlemail.com] 
Sent: Thursday, March 12, 2009 4:37 AM
To: busybox at busybox.net
Cc: Tallam, Sreenivas
Subject: Re: udhcpc failure - route: SIOCADDRT: Invalid argument

On Thursday 12 March 2009 02:43:12 am Tallam, Sreenivas wrote:
> Hi All,
>  
> I am currently using BusyBox v1.10.2
...
> Currently defined functions:
>         [, [[, addgroup, adduser, ash, awk, basename, cat, chgrp,
>         chmod, chown, chroot, cmp, cp, cut, date, dd, delgroup,
>         deluser, df, dirname, dmesg, du, echo, egrep, env, expr,
>         false, fgrep, free, getty, grep, gunzip, gzip, halt, head,
>         hostid, hostname, id, ifconfig, ifdown, ifup, init, insmod,
>         ip, ipaddr, iplink, iproute, kill, killall, linuxrc, ln,
>         logger, ls, lsmod, makedevs, md5sum, mdev, mkdir, mkfifo,
>         mknod, mkswap, mktemp, modprobe, more, mount, mv, nice,
>         nslookup, ping, ping6, pivot_root, poweroff, printf, ps,
>         pwd, reboot, reset, rm, rmdir, rmmod, route, run-parts,
                                                ^^^^^ Ok, so route
applet is enabled...

> I am using udhcpc for IPv4 DHCP configuration on my system. And with 
> this configuration, whenever I run "ifup eth0" it fails with the 
> message
> "route: SIOCADDRT: Invalid argument"

This message says that "route" command fails. Not ifup or udhcpc.

> Here is the detailed output ..
>  
> # ifdown eth0
> # echo $?
> 0
> # ifup eth0
> ### adapter index 1
> ### adapter hardware addreseth0: link is up, 100 FDX s 
> 00:a1:93:41:e3:b8 udhcpc (v1.10.2) started ### vfork'ing and 
> execle'ing /usr/share/udhcpc/default.script ### entering raw listen 
> mode ### opening raw socket on ifindex 1 ### got raw socket fd 5 ### 
> attached filter to raw socket fd 5 ### bound to raw socket fd 5 ### 
> adding option 0x35 ### adding option 0x3d ### adding option 0x3c ### 
> adding option 0x39 Sending discover...
> ### Waiting on select...
> ### Got valid DHCP packet
> ### adding option 0x35
> ### adding option 0x3d
> ### adding option 0x3c
> ### adding option 0x32
> ### adding option 0x36
> Sending select for 172.22.131.162...
> ### Waiting on select...
> ### Got valid DHCP packet
> Lease of 172.22.131.162 obtained, lease time 86400 ### vfork'ing and 
> execle'ing /usr/share/udhcpc/default.script ### entering none listen 
> mode
> route: SIOCADDRT: Invalid argument

Obviously, /usr/share/udhcpc/default.script runs route.
We need to know, which parameters it passes to route.

Find route invocation in the script. It might look similar to this:

...
      route add default gw $i dev $interface metric $((metric++)) ...

Replace it with:

      echo "Addresses"
      ip a l
      echo "Routes"
      ip r l
      echo "Running: route add default gw $i dev $interface metric
$((metric++))"
      strace -o /tmp/route.log route add default gw $i dev $interface
metric $((metric++))

then reproduce the bug and post the output and resulting /tmp/route.log.

For completeness, you can also send the same info from working case when
you don't have IPv6.
--
vda
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modified_udhcpc-DHCPv4.txt
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090312/b34b5e51/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modified_udhcpc-DHCPv4&IPv6-present.txt
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090312/b34b5e51/attachment-0003.txt>


More information about the busybox mailing list