Bug 443474

Summary: nm-system-settings doesn't calculate BROADCAST address when not given
Product: [Fedora] Fedora Reporter: Charles R. Anderson <cra>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dcbw, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.7.0-0.6.9.svn3675.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-09 21:47:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charles R. Anderson 2008-04-21 19:20:09 UTC
Description of problem:

In the old world of Fedora networking, you could configure interfaces statically
via /etc/sysconfig/network-scripts/ifcfg-* and give an IPADDR and NETMASK
without bothering to configure the redundant BROADCAST and NETWORK values.  In
case BROADCAST wasn't set, ifup would calculate the BROADCAST value (and
NETWORK) from the IPADDR and NETMASK.  It used the ipcalc tool to do that.
NM doesn't appear to do this, and as a result sets a bogus 0.0.0.0 value for
BROADCAST.  Presumably, the same problem would exist if using DHCP with a server
that doesn't send the broadcast address option, but I didn't test that.

Version-Release number of selected component (if applicable):
NetworkManager-0.7.0-0.9.2.svn3566.fc9.i386

How reproducible:
always

Steps to Reproduce:
1.

>cat /etc/sysconfig/network-scripts/ifcfg-eth1 
# Lite-On Communications Inc LNE100TX
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:a0:cc:da:ed:04
ONBOOT=yes
IPADDR=172.27.120.22
NETMASK=255.255.0.0
DHCP_HOSTNAME=dustpuppy.wpi.edu
NM_CONTROLLED=yes

2. start NetworkManager
  
Actual results:

>ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:A0:CC:DA:ED:04  
          inet addr:172.27.120.22  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::2a0:ccff:feda:ed04/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:187 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1 txqueuelen:1000 
          RX bytes:179845 (175.6 KiB)  TX bytes:31984 (31.2 KiB)
          Interrupt:16 Base address:0xf00 

Expected results:

Bcast should be 172.27.255.255 based upon the calculation of the IPADDR and NETMASK:

>ipcalc --broadcast 172.27.120.22 255.255.0.0
BROADCAST=172.27.255.255

>ipcalc --network 172.27.120.22 255.255.0.0
NETWORK=172.27.0.0

Comment 1 Dan Williams 2008-04-21 20:32:06 UTC
Fixed upstream in svn r3581 and later.

Comment 2 Charles R. Anderson 2008-04-22 12:12:23 UTC
Fix verified.


Comment 3 Dan Williams 2008-04-28 04:44:13 UTC
In latest koji builds, for example:

http://koji.fedoraproject.org/koji/buildinfo?buildID=47429


Comment 4 Fedora Update System 2008-05-19 15:46:38 UTC
NetworkManager-0.7.0-0.6.8.svn3669.fc8 has been submitted as an update for Fedora 8

Comment 5 Fedora Update System 2008-07-09 21:47:09 UTC
NetworkManager-0.7.0-0.6.9.svn3675.fc8, NetworkManager-openvpn-0.7.0-10.svn3632.fc8, NetworkManager-vpnc-0.7.0-0.7.7.svn3627.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.