After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765969 - Remove gateway for IP addresses past the first one
Remove gateway for IP addresses past the first one
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-04 10:11 UTC by Bastien Nocera
Modified: 2016-09-20 08:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Fix gateway entry visibility (4.40 KB, patch)
2016-09-16 15:05 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-05-04 10:11:13 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.
Comment 1 Bastien Nocera 2016-09-16 15:05:30 UTC
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.
Comment 2 Bastien Nocera 2016-09-20 08:36:25 UTC
Attachment 335713 [details] pushed as d28ffc9 - network: Fix gateway entry visibility