diff options
| author | Michael Biebl <biebl@debian.org> | 2016-04-12 17:33:05 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-04-12 17:33:05 +0200 |
| commit | 288a08a3672a89a9bfdb8354b6863cc039759fc2 (patch) | |
| tree | 351ac159de25507ba7eeab003153dabb1c6652a2 /src/dhcp-manager/nm-dhcp-utils.c | |
| parent | 2bfb3eb7d0323e69affca154395f51d8b577414d (diff) | |
Imported Upstream version 1.1.94 upstream/1.1.94
Diffstat (limited to 'src/dhcp-manager/nm-dhcp-utils.c')
| -rw-r--r-- | src/dhcp-manager/nm-dhcp-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dhcp-manager/nm-dhcp-utils.c b/src/dhcp-manager/nm-dhcp-utils.c index be563a69..a88a7e6d 100644 --- a/src/dhcp-manager/nm-dhcp-utils.c +++ b/src/dhcp-manager/nm-dhcp-utils.c @@ -60,7 +60,7 @@ ip4_process_dhcpcd_rfc3442_routes (const char *str, *slash = '\0'; errno = 0; rt_cidr = strtol (slash + 1, NULL, 10); - if ((errno == EINVAL) || (errno == ERANGE)) { + if (errno || rt_cidr > 32) { nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route cidr: '%s'", slash + 1); continue; } @@ -382,7 +382,8 @@ nm_dhcp_utils_ip4_config_from_options (int ifindex, in_addr_t addr; NMPlatformIP4Address address; char *str = NULL; - guint32 gwaddr = 0, plen = 0; + guint32 gwaddr = 0; + guint8 plen = 0; g_return_val_if_fail (options != NULL, NULL); |