[BusyBox 0000980]: patch to avoid "broadcast +" syntax

bugs at busybox.net bugs at busybox.net
Tue Nov 21 20:27:10 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=980 
====================================================================== 
Reported By:                robang74
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   980
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             08-03-2006 00:44 PDT
Last Modified:              11-21-2006 12:27 PST
====================================================================== 
Summary:                    patch to avoid "broadcast +" syntax
Description: 
Automatic calculation of broadcast could be done if IP and netmask is
defined.
Busybox's ifconfig made it only if "broadcast +" is specified which is not
a common use of ifconfig. This patch fix this behaviure and mantain
"broadcast +" syntax for back compatibilty which those scripts still using
it.

====================================================================== 

---------------------------------------------------------------------- 
 vda - 11-21-06 05:17  
---------------------------------------------------------------------- 
Do I understand you correctly that "standard" ifconfig automatically
deduces bcast addr while bbox's requires "broadcast +" on the command
line.

And BTW, why ifconfig insists on continuing on errors, sometimes even
without error message? It's more natural and probably better to bail out
with error message on stderr... 

---------------------------------------------------------------------- 
 vda - 11-21-06 12:27  
---------------------------------------------------------------------- 
/bin/ifconfig is busybox'ed,
/usr/bin/ifconfig is "standard"

Both work without "broadcast +" syntax.

bash-3.2# ip a l dev if
2: if: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:17:6d:77:db brd ff:ff:ff:ff:ff:ff
bash-3.2# ip a f dev if
bash-3.2# /usr/bin/ifconfig if 192.168.1.111 netmask 255.255.255.0 up
bash-3.2# ip a l dev if
2: if: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:17:6d:77:db brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.111/24 brd 192.168.1.255 scope global if


bash-3.2# ip a f dev if
bash-3.2# /bin/ifconfig if 192.168.1.111 netmask 255.255.255.0 up
bash-3.2# ip a l dev if
2: if: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:17:6d:77:db brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.111/24 brd 192.168.1.255 scope global if

Please provide an example where your patch helps. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-03-06 00:44  robang74       New Issue                                    
08-03-06 00:44  robang74       Status                   new => assigned     
08-03-06 00:44  robang74       Assigned To               => BusyBox         
08-03-06 00:44  robang74       File Added: busybox-1.1.3-ifconfig.patch         
          
11-21-06 05:17  vda            Note Added: 0001755                          
11-21-06 05:17  vda            Status                   assigned => feedback
11-21-06 12:27  vda            Note Added: 0001764                          
======================================================================




More information about the busybox-cvs mailing list