Re: ifconfig, CIDR and default broadcast address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <Pine.LNX.4.05.10012182226070.7544-100000@marina.lowendale.com.au> you wrote:
> Is this "fixed" in later versions of net-tools/ifconfig?  Or are there
> good reasons why this behaviour remains like this?

debian woody ships with the latest ifconfig from net-tools 1.57 and it is
not "fixed" with this, cause it is a kernel bug, ifconfig is actually not
giving any address to the kernel:

calista:~# strace ifconfig dummy0 1.2.3.4 netmask 255.255.255.128 up
...
ioctl(4, SIOCSIFADDR, 0xbffffc44)       = 0
ioctl(5, SIOCGIFFLAGS, 0xbffffb84)      = 0
ioctl(5, SIOCSIFFLAGS, 0xbffffb84)      = 0
ioctl(4, SIOCSIFNETMASK, 0xbffffc44)    = 0
ioctl(5, SIOCGIFFLAGS, 0xbffffb84)      = 0
ioctl(5, SIOCSIFFLAGS, 0xbffffb84)      = 0
_exit(0)                                = ?
calista:~# ifconfig dummy0
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:1.2.3.4  Bcast:1.255.255.255  Mask:255.255.255.128
          inet6 addr: fe80::/10 Scope:Link
          inet6 addr: fe80::200:ff:fe00:0/10 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
calista:~# strace ifconfig dummy0 1.2.3.4 netmask 255.255.255.128 broadcast 1.2.3.127 up
...
ioctl(4, SIOCSIFADDR, 0xbffffc24)       = 0
ioctl(5, SIOCGIFFLAGS, 0xbffffb64)      = 0
ioctl(5, SIOCSIFFLAGS, 0xbffffb64)      = 0
ioctl(4, SIOCSIFNETMASK, 0xbffffc24)    = 0
ioctl(4, SIOCSIFBRDADDR, 0xbffffc24)    = 0
ioctl(5, SIOCGIFFLAGS, 0xbffffb64)      = 0
ioctl(5, SIOCSIFFLAGS, 0xbffffb64)      = 0
ioctl(5, SIOCGIFFLAGS, 0xbffffb64)      = 0
ioctl(5, SIOCSIFFLAGS, 0xbffffb64)      = 0
_exit(0)                                = ?
calista:~# ifconfig dummy0
dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:1.2.3.4  Bcast:1.2.3.127  Mask:255.255.255.128
          inet6 addr: fe80::/10 Scope:Link
          inet6 addr: fe80::200:ff:fe00:0/10 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 

Linux calista 2.4.0-test12 #2 Wed Dec 13 23:38:03 CET 2000 i686 unknown

So, the question is, if we should fix the kernel or ifconfig. If i consider
that the kernel now is calculating the broadcast absed on a class, i guess
it is better to fix the kernel since CIDR will make it leaner.

Greetings
Bernd
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux