GNOME Bugzilla – Bug 765969
Remove gateway for IP addresses past the first one
Last modified: 2016-09-20 08:36:29 UTC
From bug 765910 > >+++ b/panels/network/connection-editor/ce-page-ip4.c > > >- add_address_row (page, address, network, gateway); > >+ add_address_row (page, > >+ nm_ip_address_get_address (addr), > >+ network, > >+ nm_setting_ip_config_get_gateway (page->setting)); > > OK, so, libnm-util/libnm-glib basically had a buggy data model, which > nm-connection-editor (and then gnome-control-center) copied, in which each > manually-configured IP address has an associated gateway address. In > reality, NM always just took the first non-empty gateway value from the > address array, and completely ignored any other gateway values. libnm > represents this more accurately, by having a single gateway value which is > separate from the address array. Ideally, the editors should show it this > way as well (eg, like nmtui does). Failing that, it would be nice to at > least make it so that only the first row in the address table can have a > non-empty gateway value. We'd just remove the gateway entry from the addresses entries past the first one.
Created attachment 335713 [details] [review] network: Fix gateway entry visibility From https://bugzilla.gnome.org/show_bug.cgi?id=765969 as explained by Dan Winship: " libnm-util/libnm-glib had a buggy data model, which nm-connection-editor (and then gnome-control-center) copied, in which each manually-configured IP address has an associated gateway address. In reality, NM always just took the first non-empty gateway value from the address array, and completely ignored any other gateway values. libnm represents this more accurately, by having a single gateway value which is separate from the address array. Ideally, the editors should show it this way as well (eg, like nmtui does). Failing that, it would be nice to at least make it so that only the first row in the address table can have a non-empty gateway value. " We went for the second option, only showing a gateway entry for the first address in the list. This isn't related to route-specific gateway addresses.
Attachment 335713 [details] pushed as d28ffc9 - network: Fix gateway entry visibility