From 652b2a38851a51699570b904d5ffc31f9dcbe2a6 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 6 Sep 2022 11:37:01 +0200 Subject: [PATCH] l3cfg: re-use plen variable in NMIPRoute creation --- src/core/nm-l3-config-data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/nm-l3-config-data.c b/src/core/nm-l3-config-data.c index 42467d50e..2c51fd025 100644 --- a/src/core/nm-l3-config-data.c +++ b/src/core/nm-l3-config-data.c @@ -2818,7 +2818,7 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co if (IS_IPv4) { r.r4 = (NMPlatformIP4Route){ .network = network_bin.addr4, - .plen = nm_ip_route_get_prefix(s_route), + .plen = plen, .gateway = next_hop_bin.addr4, .metric_any = metric_any, .metric = metric, @@ -2828,7 +2828,7 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co } else { r.r6 = (NMPlatformIP6Route){ .network = network_bin.addr6, - .plen = nm_ip_route_get_prefix(s_route), + .plen = plen, .gateway = next_hop_bin.addr6, .metric_any = metric_any, .metric = metric,