pppd-plugin: fix gateway for PPP connections without carrier-provided remote IP

During the dbus-glib to GDBus port in 89228569f (2014), the last-resort
gateway in nm_ip_up() was accidentally changed from peer_opts.hisaddr to
peer_opts.ouraddr. peer_opts.ouraddr is typically 0 when IPCP does not
provide a peer address, causing gateway=0 and broken PPP connectivity
probing/routing behavior.

Restore the original behavior from 369299271 (2008).

Fixes: 89228569f8 ('ppp-manager: port nm-pppd-plugin from dbus-glib to gdbus')
(cherry picked from commit bd0a6356eb)
This commit is contained in:
Ben Hagen 2026-03-19 16:33:21 +01:00 committed by Jan Vaclav
parent a2479fc012
commit fc6cd43097

View file

@ -198,7 +198,7 @@ nm_ip_up(void *data, int arg)
g_variant_builder_add(&builder,
"{sv}",
NM_PPP_IP4_CONFIG_GATEWAY,
g_variant_new_uint32(peer_opts.ouraddr));
g_variant_new_uint32(peer_opts.hisaddr));
}
g_variant_builder_add(&builder, "{sv}", NM_PPP_IP4_CONFIG_PREFIX, g_variant_new_uint32(32));