From: Roy Marples Date: Fri, 29 Jan 2016 10:09:35 +0000 (+0000) Subject: Max prefix to request is really 120 X-Git-Tag: v6.10.2~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40095c803a2c001600be75a0adecf8409e67d335;p=thirdparty%2Fdhcpcd.git Max prefix to request is really 120 --- diff --git a/if-options.c b/if-options.c index 9b662aad..9e4ce06d 100644 --- a/if-options.c +++ b/if-options.c @@ -1371,15 +1371,15 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, memset(&ia->addr, 0, sizeof(ia->addr)); } if (p && ia->ia_type == D6_OPTION_IA_PD) { - i = (int)strtoi(p, NULL, 0, 8, 120, &e); + ia->prefix_len = (uint8_t)strtou(p, + NULL, 0, 8, 120, &e); if (e) { logger(ctx, LOG_ERR, "%s: failed to convert" " prefix len", p); ia->prefix_len = 0; - } else - ia->prefix_len = (uint8_t)i; + } } } ia->sla_max = 0; @@ -1431,8 +1431,8 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, } } if (np) { - sla->prefix_len = (uint8_t)strtoi(np, - NULL, 0, 0, 128, &e); + sla->prefix_len = (uint8_t)strtou(np, + NULL, 0, 0, 120, &e); if (e) { logger(ctx, LOG_ERR, "%s: failed to " "convert prefix len",