BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001076 [BusyBox] Networking Support major always 10-25-06 03:21 11-05-06 10:05
Reporter Andreas Winter View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001076: "ip addr del" does not work
Description file: ipaddress.c

...
int do_ipaddr(int argc, char **argv)
{
    static const char *const commands[] = {
        "add", "delete", "list", "show", "lst", "flush", 0
    };
...
should be
...
int do_ipaddr(int argc, char **argv)
{
    static const char *const commands[] = {
        "add", "del", "list", "show", "lst", "flush", 0
    };
...
Additional Information
Attached Files  busybox.bug1076.00.diff [^] (399 bytes) 10-25-06 08:58

- Relationships

- Notes
(0001718)
Andreas Winter
10-25-06 03:26

To be more precise: del should work in addition to delete
 
(0001719)
bernhardf
10-25-06 09:01

I disagree. ip addr delete should still be supported, so you cannot simply change "delete" to "del" there.

The attached snippet uses strncmp(,key,strlen(key)) rather than strcmp.
This does not catch ambiguous args when you compare the string_array.

For this to work, we'd need to keep track on how many matches we got and bail if matches > 1.

For the ip applet, the strncmp thing should do it for now, though.
 
(0001720)
Andreas Winter
10-25-06 09:36

Hi bernardf,

I disagree, too ;-)
Unfortunately the function compare_string_array is used at many places. Changing the semantics could break other code.
On solution might be to simply add "del" to the list of commands. But this would reject "dele" and "delet" as unknown commands.
Or you can add a function compare_string_array_prefix which does what you want and return -1 if the command is ambigious.
Unfortunately "del" is used in some (many?) scripts, which would break, if this not fixed.
 
(0001721)
vda
10-25-06 18:10

Fixed in rev 16439
 
(0001722)
Andreas Winter
10-26-06 02:02

In "do_ipaddr(int argc, char **argv)"
        int command_num = 2;
should be
    int command_num = 3;
 
(0001731)
vda
11-05-06 10:05

Hopefully really fixed in rev 16515
 

- Issue History
Date Modified Username Field Change
10-25-06 03:21 Andreas Winter New Issue
10-25-06 03:21 Andreas Winter Status new => assigned
10-25-06 03:21 Andreas Winter Assigned To  => BusyBox
10-25-06 03:26 Andreas Winter Note Added: 0001718
10-25-06 08:58 bernhardf File Added: busybox.bug1076.00.diff
10-25-06 09:01 bernhardf Note Added: 0001719
10-25-06 09:36 Andreas Winter Note Added: 0001720
10-25-06 18:10 vda Status assigned => closed
10-25-06 18:10 vda Note Added: 0001721
10-25-06 18:10 vda Resolution open => fixed
10-26-06 02:02 Andreas Winter Status closed => feedback
10-26-06 02:02 Andreas Winter Resolution fixed => reopened
10-26-06 02:02 Andreas Winter Note Added: 0001722
11-05-06 10:05 vda Status feedback => closed
11-05-06 10:05 vda Note Added: 0001731
11-05-06 10:05 vda Resolution reopened => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker