From db7ddd06f3f904320478e8392a7b127d2a1393ce Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 17 Oct 2015 15:52:57 +0200 Subject: [PATCH] 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 --- src/dhclient-script | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.2