Commit e78d4c93 authored by Tomasz Kontusz's avatar Tomasz Kontusz
Browse files

network: set empty value for link-local route's gateway

When a route was created without gateway, after opening the connection editor,
that route's gateway was getting marked as error.

This commit changes the empty value on existing routes to
a valid "empty" IP.

Fixes GNOME/gnome-control-center#1055
parent 2da1a26e
Pipeline #196931 passed with stages
in 2 minutes and 15 seconds
......@@ -402,7 +402,7 @@ add_route_row (CEPageIP4 *self,
g_signal_connect_object (widget, "changed", G_CALLBACK (ce_page_changed), self, G_CONNECT_SWAPPED);
g_signal_connect_object (widget, "activate", G_CALLBACK (ensure_empty_routes_row), self, G_CONNECT_SWAPPED);
g_object_set_data (G_OBJECT (row), "gateway", widget);
gtk_entry_set_text (GTK_ENTRY (widget), gateway ? gateway : "");
gtk_entry_set_text (GTK_ENTRY (widget), gateway ? gateway : "0.0.0.0");
gtk_entry_set_width_chars (GTK_ENTRY (widget), 16);
gtk_widget_set_hexpand (widget, TRUE);
gtk_container_add (GTK_CONTAINER (row_box), widget);
......
......@@ -375,7 +375,7 @@ add_route_row (CEPageIP6 *self,
g_signal_connect_object (widget, "changed", G_CALLBACK (ce_page_changed), self, G_CONNECT_SWAPPED);
g_signal_connect_object (widget, "activate", G_CALLBACK (ensure_empty_routes_row), self, G_CONNECT_SWAPPED);
g_object_set_data (G_OBJECT (row), "gateway", widget);
gtk_entry_set_text (GTK_ENTRY (widget), gateway);
gtk_entry_set_text (GTK_ENTRY (widget), gateway ? gateway : "::0");
gtk_entry_set_width_chars (GTK_ENTRY (widget), 16);
gtk_widget_set_hexpand (widget, TRUE);
gtk_container_add (GTK_CONTAINER (row_box), widget);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment