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
This commit is contained in:
@@ -279,8 +279,9 @@ lease_to_ip4_config (const char *iface,
|
|||||||
/* Domain Name */
|
/* Domain Name */
|
||||||
r = sd_dhcp_lease_get_domainname (lease, &str);
|
r = sd_dhcp_lease_get_domainname (lease, &str);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
/* Multiple domains sometimes stuffed into the option */
|
/* Multiple domains sometimes stuffed into option 15 "Domain Name".
|
||||||
char **domains = g_strsplit (str, " ", 0);
|
* As systemd escapes such characters, split them at \\032. */
|
||||||
|
char **domains = g_strsplit (str, "\\032", 0);
|
||||||
char **s;
|
char **s;
|
||||||
|
|
||||||
for (s = domains; *s; s++) {
|
for (s = domains; *s; s++) {
|
||||||
|
Reference in New Issue
Block a user