From 2bc4e227b2be620a19a65066cf65a4e1d38b03e5 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 27 Jan 2010 14:18:11 -0800 Subject: [PATCH] Don't compute broadcast if no address --- net/redhat-linux-lib.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/redhat-linux-lib.pl b/net/redhat-linux-lib.pl index 7eb4ddeb0..3cae8f5be 100755 --- a/net/redhat-linux-lib.pl +++ b/net/redhat-linux-lib.pl @@ -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'};