Notes |
(0001755)
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... |
|
(0001764)
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. |
|
(0001765)
robang74
11-22-06 01:24
|
Try with something different from 192.168... or other standard class ip.
See this belowe how "broadcast +" works in re-setting broadcast in order to make it fits the netmask/ip while it supposed has to be done without "broadcast +" either.
BusyBox v1.1.2 (2006.11.21-14:23+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:00
inet addr:172.16.241.217 Bcast:172.16.255.255 Mask:255.255.0.0
# ifconfig eth0 172.16.241.216
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:00
inet addr:172.16.241.216 Bcast:172.16.255.255 Mask:255.255.0.0
# ifconfig eth0 172.16.241.216 netmask 255.255.255.0
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:00
inet addr:172.16.241.216 Bcast:172.16.255.255 Mask:255.255.255.0
# ifconfig eth0 172.16.241.216 netmask 255.255.255.0 broadcast +
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:00
inet addr:172.16.241.216 Bcast:172.16.241.255 Mask:255.255.255.0
# ifconfig eth0 192.168.0.1
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:00
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 |
|
(0001767)
vda
11-22-06 12:55
|
Current svn is ok:
bash-3.2# ifconfig if 172.16.241.216
bash-3.2# ip a l dev if
2: if: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
inet 172.16.241.216/16 brd 172.16.255.255 scope global if
bash-3.2# ifconfig if 172.16.241.216 netmask 255.255.255.0
bash-3.2# ip a l dev if
2: if: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
inet 172.16.241.216/24 brd 172.16.241.255 scope global if
^^^ ok |
|
(0001811)
robang74
11-27-06 10:31
|
busybox-1.2.2.1-ifconfig_2.patch is the same as 1.1.3 version but ported on last available stable busybox version + an aesthetic correction about argv vector usage.
busybox-1.2.2.1-vda_coding.patch is a syntax modification VDA suggests |
|
(0001817)
robang74
11-27-06 12:32
edited on: 11-29-06 01:43
|
busybox-1.2.2.1-ifconfig_3.patch: this is the last patch and the only one I think it is enought correct to be included in busybox.
Problems fixed since the version 1.1.3 patch:
1) double *++argv check to avoid to check argv[argc+1] ?= NULL
2) added an #ifdef in the 3-cases-if to reduce the size with no broadcast cfg opt
|
|
(0001842)
robang74
11-30-06 01:51
edited on: 01-06-07 15:15
|
These two goes togheter
busybox-20061130-ifconfig_3.patch
busybox-network-config.patch
sorry I have no SVN access so I made the today snapshot patch.
I hope these would be applied.
|
|