Skip to content

Commit c2eb4b5

Browse files
systemcrashNoltari
authored andcommitted
config: fix erroneous clamp message if clamp value == max
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: #283 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
1 parent 54b9e72 commit c2eb4b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr
13041304
if (pd_min_len > PD_MIN_LEN_MAX)
13051305
iface->dhcpv6_pd_min_len = PD_MIN_LEN_MAX;
13061306
iface->dhcpv6_pd_min_len = pd_min_len;
1307-
if (pd_min_len >= PD_MIN_LEN_MAX)
1307+
if (pd_min_len > PD_MIN_LEN_MAX)
13081308
warn("Clamped invalid %s value configured for interface '%s' to %d",
13091309
iface_attrs[IFACE_ATTR_DHCPV6_PD_MIN_LEN].name, iface->name, iface->dhcpv6_pd_min_len);
13101310
}

0 commit comments

Comments
 (0)