If the clamp value is equal to and only equal to PD_MIN_LEN_MAX then the warn
is emitted, when it shouldn't be since PD_MIN_LEN_MAX is a valid max value.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/odhcpd/pull/283
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
if (pd_min_len > PD_MIN_LEN_MAX)
iface->dhcpv6_pd_min_len = PD_MIN_LEN_MAX;
iface->dhcpv6_pd_min_len = pd_min_len;
- if (pd_min_len >= PD_MIN_LEN_MAX)
+ if (pd_min_len > PD_MIN_LEN_MAX)
warn("Clamped invalid %s value configured for interface '%s' to %d",
iface_attrs[IFACE_ATTR_DHCPV6_PD_MIN_LEN].name, iface->name, iface->dhcpv6_pd_min_len);
}