bug#1210: [BusyBox] bug#1210: route does not show all routes

Jaspreet Singh jsingh at somanetworks.com
Mon Aug 27 10:45:03 UTC 2001


The patch I sent earlier on was applied incorrectly.

My modifications were:

if(flgs&1)
      flags[ifl++]='U';
else {
      nl++;
      continue;
}

This allows for only printing routes that are Up.

not..

 if(nl==1) {
       printf("Kernel IP routing table\n"
"Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface\n
");
 } else {
       nl++;
       continue;
}
 

"Vladimir N. Oleynik" wrote:
> 
> Arne
> 
> >
> > Package: busybox
> > Version: 0.60.1
> > Severity: normal
> >
> > bb route has a little bug in it preventing it from showing the correct set
> > of routes on a system. It only displays the first route!
> >
> > myrouter# route
> > Kernel IP routing table
> > Destination     Gateway         Genmask        Flags Metric Ref   Use Iface
> > 192.168.2.0     *               255.255.255.0  U     0      0     0   eth1
> >
> > with GNU netstat:
> > myrouter# netstat -rn
> > Destination     Gateway         Genmask        Flags   MSS Window  irtt Iface
> > 192.168.2.0     0.0.0.0         255.255.255.0  U       40  0          0 eth1
> > 192.168.1.0     0.0.0.0         255.255.255.0  U       40  0          0 eth0
> > 12.12.1.0       0.0.0.0         255.255.255.0  U       40  0          0 eth0
> > 12.12.0.0       0.0.0.0         255.255.255.0  U       40  0          0 eth1
> >
> > (sorry for the formating, it not the real output, it was "done by hand").
> >
> > The very small attached patch fixes this
> 
> 
> I too do not understand, 1.10 change what for was brought in function
> displayroute()
> (its author).
> 
> All changes in displayroute() must remove.
> 
> -} else {
> -  nl++;
> - continue;
>  }

-- 
Jaspreet Singh
SOMA Networks, Inc.

---

This message and its attachments, if any,  are intended only for the use
of the  individual(s)  or  entity  to  which  it  is  addressed,  and
contains information that is Valuable, Proprietary and Confidential to
SOMA Networks Inc..   If the reader of this message is not the intended 
recipient, or an employee or agent authorized and responsible  for
delivering the message to the intended  recipient,  you  are  hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited.  If you have  received  this 
communication in error, please immediately notify SOMA Networks, Inc. 
by  e-mail  at  legal at somanetworks.com  and delete all copies of the
message.  Thank you.






More information about the busybox mailing list