mirror of
https://github.com/NetworkConfiguration/dhcpcd.git
synced 2026-01-26 14:13:26 +00:00
options: Don't assume vsio options have an argument (#578)
* options: Don't assume vsio options have an argument Should fix #577.
This commit is contained in:
parent
33df3ed00b
commit
cd0b26953c
@ -936,7 +936,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
|
||||
return -1;
|
||||
#else
|
||||
fp = strwhite(arg);
|
||||
if (fp)
|
||||
if (fp != NULL)
|
||||
*fp++ = '\0';
|
||||
u = (uint32_t)strtou(arg, NULL, 0, 0, UINT32_MAX, &e);
|
||||
if (e) {
|
||||
@ -944,9 +944,13 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
|
||||
return -1;
|
||||
}
|
||||
|
||||
fp = strskipwhite(fp);
|
||||
p = strchr(fp, ',');
|
||||
if (!p || !p[1]) {
|
||||
if (fp != NULL)
|
||||
fp = strskipwhite(fp);
|
||||
if (fp != NULL)
|
||||
p = strchr(fp, ',');
|
||||
else
|
||||
p = NULL;
|
||||
if (p == NULL || p[1] == '\0') {
|
||||
logerrx("invalid vendor format: %s", arg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user