zcip left ip blank

kate katty kate.kattythebest at gmail.com
Thu Aug 6 05:13:12 UTC 2009


Hi ,

command is "zcip -r [ip] -p[prefix]  br0  [path]/zcip.script"
prefix is calculated from the netmask

zcip failed only once for me, I didnt know the exact reason then. And I'm
unable to reproduce the same, Could you please suggest idea that what if
zcip fails even though arguments are valid and  present.

I'm using busybox version 1


Regards,


On Fri, Jul 24, 2009 at 11:56 PM, Denys Vlasenko
<vda.linux at googlemail.com>wrote:

> On Friday 24 July 2009 09:12, kate katty wrote:
> >  Thank you Denys for the response !!
> >
> > I've attached my zcip.script please find the same in this mail.
> > zcip.script called  inside a child process via execl()
> > i.e
> >  execl(script, script, arg, prefix, NULL)
> >
> > Guessing that if zcip.script exit with non zero then it'll return back
> > without allocation ip
> > How could I check whether zcip.script returns zero (exit 0) or non-zero
> > (exit 1)
>
> It returns 1 here:
>
>        if [ "x$2" = x ]
>        then
>                exit 1
>        fi
>
> I don't know why your script expects to have parameter #2.
> zcip does not provide it.
>
> It looks like your script thinks that $2 is the mask:
>
>        exec ip address add dev $interface \
>              "$ip/$2" broadcast + 2>&1
>
> It should use 16 instead of $2:
>
>        exec ip address add dev $interface \
>              "$ip/16" broadcast + 2>&1
>
> --
> vda
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090806/40d7d1e3/attachment.htm>


More information about the busybox mailing list