]> git.ipfire.org Git - people/ms/network.git/commitdiff
dhclient-script: Fix wrong funtion call to determine prefix
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 17 Oct 2015 13:52:57 +0000 (15:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 17 Oct 2015 13:52:57 +0000 (15:52 +0200)
A wrong function was called to determine the prefix from
the subnet mask.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dhclient-script

index 73dfbfaa9ccf1dea5925af2ccae4b3f98ed90057..212df75d1bf4b86f024832efb8dd0fcd9e62fb10 100644 (file)
@@ -217,12 +217,12 @@ case "${reason}" in
                                        [ ! "${old_interface_mtu}" = "${new_interface_mtu}" ]; then
 
 
-                                       # Calc a prefix out of address and subnet mask.
-                                       new_prefix="$(ipv4_calculate_prefix ${new_ip_address} ${new_subnet_mask})"
+                                       # Calc the prefix from the subnet mask
+                                       new_prefix="$(ipv4_netmask2prefix "${new_subnet_mask}")"
 
                                        # Set the new ip address.
-                                       ip_address_add ${interface} ${new_ip_address}/${new_prefix}
-                                       device_set_up ${interface}
+                                       ip_address_add "${interface}" "${new_ip_address}/${new_prefix}"
+                                       device_set_up "${interface}"
 
 
                                        # A MTU of 576 is used for X.25 and dialup connections. Some broken DHCP