[BusyBox 0001076]: "ip addr del" does not work
Bernhard Fischer
rep.nop at aon.at
Wed Oct 25 16:06:45 UTC 2006
vda,
On Wed, Oct 25, 2006 at 09:01:18AM -0700, bugs at busybox.net wrote:
>
>A NOTE has been added to this issue.
>======================================================================
>http://busybox.net/bugs/view.php?id=1076
>======================================================================
>Reported By: Andreas Winter
>Assigned To: BusyBox
>======================================================================
>Project: BusyBox
>Issue ID: 1076
>Category: Networking Support
>Reproducibility: always
>Severity: major
>Priority: normal
>Status: assigned
>======================================================================
>Date Submitted: 10-25-2006 03:21 PDT
>Last Modified: 10-25-2006 09:01 PDT
>======================================================================
>Summary: "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
> };
>...
>======================================================================
>
>----------------------------------------------------------------------
> Andreas Winter - 10-25-06 03:26
>----------------------------------------------------------------------
>To be more precise: del should work in addition to delete
>
>----------------------------------------------------------------------
> 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.
What do you think about keeping track of the number of matches to catch
if we've seen ambiguous matches in compare_string_array?
Thanks for your suggestions.
>
>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
>======================================================================
>
>_______________________________________________
>busybox-cvs mailing list
>busybox-cvs at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox-cvs
>
More information about the busybox
mailing list