mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-03 06:40:32 +01:00
parent
2f0a5f305c
commit
6aa1111aea
1 changed files with 8 additions and 8 deletions
|
|
@ -1524,20 +1524,20 @@ maybe_add_option(NMDhcpClient *self, GHashTable *hash, const char *key, GVariant
|
|||
g_hash_table_insert(hash, g_strdup(key), str_value);
|
||||
|
||||
/* dhclient has no special labels for private dhcp options: it uses "unknown_xyz"
|
||||
* labels for that. We need to identify those to alias them to our "private_xyz"
|
||||
* format unused in the internal dchp plugins.
|
||||
*/
|
||||
* labels for that. We need to identify those to alias them to our "private_xyz"
|
||||
* format unused in the internal dchp plugins.
|
||||
*/
|
||||
if ((priv_opt_num = label_is_unknown_xyz(key)) > 0) {
|
||||
gs_free guint8 *check_val = NULL;
|
||||
char *hex_str = NULL;
|
||||
gsize len;
|
||||
|
||||
/* dhclient passes values from dhcp private options in its own "string" format:
|
||||
* if the raw values are printable as ascii strings, it will pass the string
|
||||
* representation; if the values are not printable as an ascii string, it will
|
||||
* pass a string displaying the hex values (hex string). Try to enforce passing
|
||||
* always an hex string, converting string representation if needed.
|
||||
*/
|
||||
* if the raw values are printable as ascii strings, it will pass the string
|
||||
* representation; if the values are not printable as an ascii string, it will
|
||||
* pass a string displaying the hex values (hex string). Try to enforce passing
|
||||
* always an hex string, converting string representation if needed.
|
||||
*/
|
||||
check_val = nm_utils_hexstr2bin_alloc(str_value, FALSE, TRUE, ":", 0, &len);
|
||||
hex_str = nm_utils_bin2hexstr_full(check_val ?: (guint8 *) str_value,
|
||||
check_val ? len : strlen(str_value),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue