Don't compute broadcast if no address

This commit is contained in:
Jamie Cameron
2010-01-27 14:18:11 -08:00
parent cb2f72a0e2
commit 2bc4e227b2

View File

@@ -94,8 +94,11 @@ while($f = readdir(CONF)) {
($conf{'ONBOOT'} eq 'yes');
$b->{'address'} = $conf{'IPADDR'};
$b->{'netmask'} = $conf{'NETMASK'};
$b->{'broadcast'} = $conf{'BROADCAST'} ||
&compute_broadcast($b->{'address'}, $b->{'netmask'});
$b->{'broadcast'} = $conf{'BROADCAST'};
if (!$b->{'broadcast'} && $b->{'address'} && $b->{'netmask'}) {
$b->{'broadcast'} = &compute_broadcast($b->{'address'},
$b->{'netmask'});
}
$b->{'gateway'} = $conf{'GATEWAY'};
$b->{'mtu'} = $conf{'MTU'};
$b->{'ether'} = $conf{'MACADDR'};