diff options
| author | Jeremy Bicha <jbicha@ubuntu.com> | 2018-02-08 17:55:49 -0500 |
|---|---|---|
| committer | Jeremy Bicha <jbicha@ubuntu.com> | 2018-02-08 17:55:49 -0500 |
| commit | f1c906035c6ea7eb635664835c153aed553dc2e5 (patch) | |
| tree | 7b870b6cef1f902486dc706084124c6964b342a6 /src/dhcp/nm-dhcp-dhclient-utils.c | |
| parent | d6158994abe7b2be73443f933ed7fdcc40954c24 (diff) | |
| parent | d0408a3e3b1cc6effec321d098008ef0c4acf91b (diff) | |
Merge tag 'debian/1.10.4-1' into bionic
network-manager Debian release 1.10.4-1
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 */ |