summaryrefslogtreecommitdiff
path: root/src/ppp/nm-ppp-manager.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-12 08:16:47 +0200
committerThomas Haller <thaller@redhat.com>2017-07-05 14:22:10 +0200
commit89385bd9683c521fbc85b5e452459c3d46d4528d (patch)
treeda17fc6be4d612d37dc3cd225269c1f7eb09bbae /src/ppp/nm-ppp-manager.c
parent6d9c3eab385fa809996a41bceb923e353addab37 (diff)
downloadNetworkManager-89385bd9683c521fbc85b5e452459c3d46d4528d.tar.gz
core: pass NMDedupMultiIndex instance to NMIP4Config and other
NMIP4Config, NMIP6Config, and NMPlatform shall share one NMDedupMultiIndex instance. For that, pass an NMDedupMultiIndex instance to NMPlatform and NMNetns. NMNetns than passes it on to NMDevice, NMDhcpClient, NMIP4Config and NMIP6Config. So currently NMNetns is the access point to the shared NMDedupMultiIndex instance, and it gets it from it's NMPlatform instance. The NMDedupMultiIndex instance is really a singleton, we don't want multiple instances of it. However, for testing, instead of adding a singleton instance, pass the instance explicitly around.
Diffstat (limited to 'src/ppp/nm-ppp-manager.c')
-rw-r--r--src/ppp/nm-ppp-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index 6343df8bf4..104adf5475 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -409,7 +409,8 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
nm_clear_g_source (&priv->ppp_timeout_handler);
- config = nm_ip4_config_new (nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface));
+ config = nm_ip4_config_new (nm_platform_get_multi_idx (NM_PLATFORM_GET),
+ nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface));
memset (&address, 0, sizeof (address));
address.plen = 32;
@@ -505,7 +506,8 @@ impl_ppp_manager_set_ip6_config (NMPPPManager *manager,
nm_clear_g_source (&priv->ppp_timeout_handler);
- config = nm_ip6_config_new (nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface));
+ config = nm_ip6_config_new (nm_platform_get_multi_idx (NM_PLATFORM_GET),
+ nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface));
memset (&addr, 0, sizeof (addr));
addr.plen = 64;