network: Fix cloned MAC not being saved for Ethernet
We read the MAC as being the cloned MAC, which NM would likely take to mean that we didn't want a cloned MAC. See https://bugzilla.redhat.com/show_bug.cgi?id=1467295 https://bugzilla.gnome.org/show_bug.cgi?id=793072
This commit is contained in:
parent
10738d68c6
commit
6b043fd3dd
1 changed files with 7 additions and 3 deletions
|
@ -86,7 +86,7 @@ static void
|
||||||
ui_to_setting (CEPageEthernet *page)
|
ui_to_setting (CEPageEthernet *page)
|
||||||
{
|
{
|
||||||
gchar *device_mac = NULL;
|
gchar *device_mac = NULL;
|
||||||
gchar *cloned_mac;
|
gchar *cloned_mac = NULL;
|
||||||
const gchar *text;
|
const gchar *text;
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
|
|
||||||
|
@ -95,8 +95,12 @@ ui_to_setting (CEPageEthernet *page)
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||||
device_mac = ce_page_trim_address (text);
|
device_mac = ce_page_trim_address (text);
|
||||||
}
|
}
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
|
||||||
cloned_mac = ce_page_trim_address (text);
|
entry = gtk_bin_get_child (GTK_BIN (page->cloned_mac));
|
||||||
|
if (entry) {
|
||||||
|
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||||
|
cloned_mac = ce_page_trim_address (text);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_set (page->setting_wired,
|
g_object_set (page->setting_wired,
|
||||||
NM_SETTING_WIRED_MAC_ADDRESS, device_mac,
|
NM_SETTING_WIRED_MAC_ADDRESS, device_mac,
|
||||||
|
|
Loading…
Add table
Reference in a new issue