diff options
Diffstat (limited to 'src/ppp/nm-pppd-plugin.c')
| -rw-r--r-- | src/ppp/nm-pppd-plugin.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/ppp/nm-pppd-plugin.c b/src/ppp/nm-pppd-plugin.c index 989f7433..0ac8f907 100644 --- a/src/ppp/nm-pppd-plugin.c +++ b/src/ppp/nm-pppd-plugin.c @@ -28,7 +28,6 @@ #include <pppd/ipcp.h> #include <sys/socket.h> #include <netinet/in.h> -#include <net/if.h> #include <arpa/inet.h> #include <dlfcn.h> @@ -37,9 +36,7 @@ #include <pppd/ipv6cp.h> #include "nm-default.h" - #include "nm-dbus-interface.h" - #include "nm-pppd-plugin.h" #include "nm-ppp-status.h" @@ -53,9 +50,7 @@ static void nm_phasechange (void *data, int arg) { NMPPPStatus ppp_status = NM_PPP_STATUS_UNKNOWN; - char new_name[IF_NAMESIZE]; char *ppp_phase; - int index; g_return_if_fail (G_IS_DBUS_PROXY (proxy)); @@ -131,25 +126,6 @@ nm_phasechange (void *data, int arg) NULL, NULL, NULL); } - - if (ppp_status == PHASE_RUNNING) { - index = if_nametoindex (ifname); - /* Make a sync call to ensure that when the call - * terminates the interface already has its final - * name. */ - g_dbus_proxy_call_sync (proxy, - "SetIfindex", - g_variant_new ("(i)", index), - G_DBUS_CALL_FLAGS_NONE, - 25000, - NULL, NULL); - /* Update the name in pppd if NM changed it */ - if ( if_indextoname (index, new_name) - && !nm_streq0 (ifname, new_name)) { - g_message ("nm-ppp-plugin: interface name changed from '%s' to '%s'", ifname, new_name); - strncpy (ifname, new_name, IF_NAMESIZE); - } - } } static void @@ -172,9 +148,6 @@ nm_ip_up (void *data, int arg) g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); - /* Keep sending the interface name to be backwards compatible - * with older versions of NM during a package upgrade, where - * NM is not restarted and the pppd plugin was not loaded. */ g_variant_builder_add (&builder, "{sv}", NM_PPP_IP4_CONFIG_INTERFACE, g_variant_new_string (ifname)); @@ -269,9 +242,6 @@ nm_ip6_up (void *data, int arg) g_message ("nm-ppp-plugin: (%s): ip6-up event", __func__); g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); - /* Keep sending the interface name to be backwards compatible - * with older versions of NM during a package upgrade, where - * NM is not restarted and the pppd plugin was not loaded. */ g_variant_builder_add (&builder, "{sv}", NM_PPP_IP6_CONFIG_INTERFACE, g_variant_new_string (ifname)); @@ -391,6 +361,8 @@ plugin_init (void) GDBusConnection *bus; GError *err = NULL; + nm_g_type_init (); + g_message ("nm-ppp-plugin: (%s): initializing", __func__); bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &err); |