l3cfg: re-use plen variable in NMIPRoute creation
This commit is contained in:

committed by
Thomas Haller

parent
12e5b944f6
commit
652b2a3885
@@ -2818,7 +2818,7 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co
|
|||||||
if (IS_IPv4) {
|
if (IS_IPv4) {
|
||||||
r.r4 = (NMPlatformIP4Route){
|
r.r4 = (NMPlatformIP4Route){
|
||||||
.network = network_bin.addr4,
|
.network = network_bin.addr4,
|
||||||
.plen = nm_ip_route_get_prefix(s_route),
|
.plen = plen,
|
||||||
.gateway = next_hop_bin.addr4,
|
.gateway = next_hop_bin.addr4,
|
||||||
.metric_any = metric_any,
|
.metric_any = metric_any,
|
||||||
.metric = metric,
|
.metric = metric,
|
||||||
@@ -2828,7 +2828,7 @@ _init_from_connection_ip(NML3ConfigData *self, int addr_family, NMConnection *co
|
|||||||
} else {
|
} else {
|
||||||
r.r6 = (NMPlatformIP6Route){
|
r.r6 = (NMPlatformIP6Route){
|
||||||
.network = network_bin.addr6,
|
.network = network_bin.addr6,
|
||||||
.plen = nm_ip_route_get_prefix(s_route),
|
.plen = plen,
|
||||||
.gateway = next_hop_bin.addr6,
|
.gateway = next_hop_bin.addr6,
|
||||||
.metric_any = metric_any,
|
.metric_any = metric_any,
|
||||||
.metric = metric,
|
.metric = metric,
|
||||||
|
Reference in New Issue
Block a user