diff options
| author | Michael Biebl <biebl@debian.org> | 2018-02-07 02:40:03 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-02-07 02:40:03 +0100 |
| commit | 77dfac263f463c1cdb8afb9b8c79a4e83bf08cd8 (patch) | |
| tree | e5288440b22e159a601450c2e5d40b013bdb4aa0 /src/dhcp/nm-dhcp-dhclient-utils.c | |
| parent | 3d9525cb641ac53c6d36bf5312710c22ae4bd926 (diff) | |
| parent | 50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff) | |
Update upstream source from tag 'upstream/1.10.4'
Update to upstream version '1.10.4' with Debian dir d2c0f877c591b3125f4e0cfcc711c04669d8d62b
Diffstat (limited to 'src/dhcp/nm-dhcp-dhclient-utils.c')
| -rw-r--r-- | src/dhcp/nm-dhcp-dhclient-utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c index e63e6a86..4df90d76 100644 --- a/src/dhcp/nm-dhcp-dhclient-utils.c +++ b/src/dhcp/nm-dhcp-dhclient-utils.c @@ -178,7 +178,7 @@ read_client_id (const char *str) gs_free char *s = NULL; char *p; - g_assert (!strncmp (str, CLIENTID_TAG, NM_STRLEN (CLIENTID_TAG))); + nm_assert (!strncmp (str, CLIENTID_TAG, NM_STRLEN (CLIENTID_TAG))); str += NM_STRLEN (CLIENTID_TAG); while (g_ascii_isspace (*str)) @@ -198,6 +198,9 @@ read_client_id (const char *str) if (s[strlen (s) - 1] == ';') s[strlen (s) - 1] = '\0'; + if (!s[0]) + return NULL; + return nm_dhcp_utils_client_id_string_to_bytes (s); } @@ -329,8 +332,7 @@ nm_dhcp_dhclient_create_config (const char *interface, continue; /* Otherwise capture and return the existing client id */ - if (out_new_client_id) - *out_new_client_id = read_client_id (p); + NM_SET_OUT (out_new_client_id, read_client_id (p)); } /* Override config file hostname and use one from the connection */ |