summaryrefslogtreecommitdiff
path: root/src/ppp/nm-ppp-manager.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-12-12 17:11:34 +0100
committerThomas Haller <thaller@redhat.com>2018-12-13 09:16:32 +0100
commit589063db3b08a5899eae1e6c84eb68bd309d2736 (patch)
treed357fc666cc4593e82fbd3df8306aaf239978bfc /src/ppp/nm-ppp-manager.c
parentadbb9eb2466913bc518ad1904b1727c49f08a2fc (diff)
downloadNetworkManager-589063db3b08a5899eae1e6c84eb68bd309d2736.tar.gz
core: use addr-family argument for nm_utils_get_ip_config_method()
Recently, more and more code was refactored to use an addr_family integer to distinguish between IPv4 and IPv6. Refactor nm_utils_get_ip_config_method() and nm_device_get_effective_ip_config_method() to do that too. If we use different identifiers, we need to translate from one to another and its inconsistent. Also, accessing a GType is an unnecessary function call, instead of a plain constant.
Diffstat (limited to 'src/ppp/nm-ppp-manager.c')
-rw-r--r--src/ppp/nm-ppp-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index d012fcb710..1524591a83 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -1030,9 +1030,9 @@ _ppp_manager_start (NMPPPManager *self,
adsl_setting = (NMSettingAdsl *) nm_connection_get_setting (connection, NM_TYPE_SETTING_ADSL);
/* Figure out what address methods should be enabled */
- ip4_method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ ip4_method = nm_utils_get_ip_config_method (connection, AF_INET);
ip4_enabled = g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0;
- ip6_method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ ip6_method = nm_utils_get_ip_config_method (connection, AF_INET6);
ip6_enabled = g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0;
ppp_cmd = create_pppd_cmd_line (self,