1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-08 05:57:26 +03:00

dhcp6: add missing option length check

Closes #13578.

(cherry picked from commit 6ffe71d0e22326f8ea5775c188ae0e13573cd123)
This commit is contained in:
Yu Watanabe 2019-09-17 22:18:49 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent ccf797511e
commit f2d9af4322
2 changed files with 5 additions and 2 deletions

View File

@ -29,8 +29,8 @@
#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
#define IRT_DEFAULT 1 * USEC_PER_DAY
#define IRT_MINIMUM 600 * USEC_PER_SEC
#define IRT_DEFAULT (1 * USEC_PER_DAY)
#define IRT_MINIMUM (600 * USEC_PER_SEC)
/* what to request from the server, addresses (IA_NA) and/or prefixes (IA_PD) */
enum {
@ -1002,6 +1002,9 @@ static int client_parse_message(
break;
case SD_DHCP6_OPTION_INFORMATION_REFRESH_TIME:
if (optlen != 4)
return -EINVAL;
irt = be32toh(*(be32_t *) optval) * USEC_PER_SEC;
break;
}

Binary file not shown.