[Bug 5786] ifconfig oddly won't respect CIDR notation

bugzilla at busybox.net bugzilla at busybox.net
Sun Jan 20 17:14:52 UTC 2013


https://bugs.busybox.net/show_bug.cgi?id=5786

Denys Vlasenko <vda.linux at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> 2013-01-20 17:15:14 UTC ---
Indeed, bbox's ifconfig doesn't accept that format.

It does not bail out by accident, because parser strips out /MASK
before parsing IP.
(Why? The parser is reused for "add IPV6/MASK" and "del IPV6/MASK" cases).

For now I made so that it won't accept this format:

commit 31dc8603eedc0140c798c9af3404a35ea190af2c
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Sun Jan 20 18:10:12 2013 +0100

    ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask)


> i could use:
> ----
> ifconfig eth4 172.16.2.1 netmask 255.255.255.0 broadcast 172.16.2.255

Please do. That's how ifconfig worked from the time immemorial, before new
netmask notation was born.
If you want more modern tool, consider switching to ip.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list