mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 12:40:16 +01:00
sd/dhcp: workaround multiple "Domain Name" (option 15) entries
https://mail.gnome.org/archives/networkmanager-list/2005-April/msg00022.html
https://tools.ietf.org/html/rfc2132#section-3.17
https://bugzilla.gnome.org/show_bug.cgi?id=766191
(cherry picked from commit 2e710c2e10)
This commit is contained in:
parent
002bdb8b0a
commit
e35d3bfb41
1 changed files with 3 additions and 2 deletions
|
|
@ -279,8 +279,9 @@ lease_to_ip4_config (const char *iface,
|
|||
/* Domain Name */
|
||||
r = sd_dhcp_lease_get_domainname (lease, &str);
|
||||
if (r == 0) {
|
||||
/* Multiple domains sometimes stuffed into the option */
|
||||
char **domains = g_strsplit (str, " ", 0);
|
||||
/* Multiple domains sometimes stuffed into option 15 "Domain Name".
|
||||
* As systemd escapes such characters, split them at \\032. */
|
||||
char **domains = g_strsplit (str, "\\032", 0);
|
||||
char **s;
|
||||
|
||||
for (s = domains; *s; s++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue