Sebastian Kloska wrote:
Hi List,
Since the latest update I do not get a default gateway via dhcp
in our companies network. Found out that dhclient-script
in dhclient-3.0.2-26.FC4 rejects to set our default route.
10.0.255.254
The following statement is responsible:
<snip>
for router in $new_routers; do
if [ -z "$router" ] || [ `IFS=. ip2num $router` -le 0
] || [[ $router = *255* ]] || [[ "${default_routers[@]}" == *"$router"*
]]; then
continue;
fi;
default_routers=(${default_routers[@]} $router)
add_default_gateway $router $metric;
let i=i+1;
metric=$i;
done
</snip>
The add_default_gateway function is never called whenever there is a 255
within the ip
of the default route as reported by the DHCP server, which is the case
in our companies
network.
Is this a bug or is there a convention which forbits the *255* gateway
address ?
Thanks
Sebastian
Sebastian,
I think you are right. But, there is a growing majority that do not
like using .255 as the IP. Because this address is usually reserved for
broadcast addresses and not for physical machines.
That the case the script should be looking for an IP that ends in .255
and not one that contains a 255 in the IP address.
James Kosin
--
Scanned by ClamAV - http://www.clamav.net