From fc6cd43097f2a23bf3e38dc2f4db677016a690ea Mon Sep 17 00:00:00 2001 From: Ben Hagen Date: Thu, 19 Mar 2026 16:33:21 +0100 Subject: [PATCH] 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: 89228569f890 ('ppp-manager: port nm-pppd-plugin from dbus-glib to gdbus') (cherry picked from commit bd0a6356eb7ab8bfff769d93ca91a139a37e5602) --- src/core/ppp/nm-pppd-plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ppp/nm-pppd-plugin.c b/src/core/ppp/nm-pppd-plugin.c index c8a866ec50..0bf58a0c36 100644 --- a/src/core/ppp/nm-pppd-plugin.c +++ b/src/core/ppp/nm-pppd-plugin.c @@ -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));