From: Michael Tremer Date: Sat, 17 Oct 2015 13:52:57 +0000 (+0200) Subject: dhclient-script: Fix wrong funtion call to determine prefix X-Git-Tag: 007~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db7ddd06f3f904320478e8392a7b127d2a1393ce;p=network.git dhclient-script: Fix wrong funtion call to determine prefix A wrong function was called to determine the prefix from the subnet mask. Signed-off-by: Michael Tremer --- diff --git a/src/dhclient-script b/src/dhclient-script index 73dfbfaa..212df75d 100644 --- a/src/dhclient-script +++ b/src/dhclient-script @@ -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