|
Packit Service |
87a54e |
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
Packit |
5756e2 |
/*
|
|
Packit |
5756e2 |
* Copyright (C) 2004 - 2018 Red Hat, Inc.
|
|
Packit |
5756e2 |
* Copyright (C) 2005 - 2008 Novell, Inc.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-default.h"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-dispatcher.h"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-libnm-core-aux/nm-dispatcher-api.h"
|
|
Packit |
5756e2 |
#include "NetworkManagerUtils.h"
|
|
Packit |
5756e2 |
#include "nm-utils.h"
|
|
Packit |
5756e2 |
#include "nm-connectivity.h"
|
|
Packit |
5756e2 |
#include "nm-act-request.h"
|
|
Packit |
5756e2 |
#include "devices/nm-device.h"
|
|
Packit |
5756e2 |
#include "nm-dhcp-config.h"
|
|
Packit |
5756e2 |
#include "nm-proxy-config.h"
|
|
Packit |
5756e2 |
#include "nm-ip4-config.h"
|
|
Packit |
5756e2 |
#include "nm-ip6-config.h"
|
|
Packit |
5756e2 |
#include "nm-manager.h"
|
|
Packit |
5756e2 |
#include "settings/nm-settings-connection.h"
|
|
Packit |
5756e2 |
#include "platform/nm-platform.h"
|
|
Packit |
5756e2 |
#include "nm-core-internal.h"
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
#define CALL_TIMEOUT (1000 * 60 * 10) /* 10 minutes for all scripts */
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#define _NMLOG_DOMAIN LOGD_DISPATCH
|
|
Packit Service |
a1bd4f |
#define _NMLOG(level, ...) __NMLOG_DEFAULT(level, _NMLOG_DOMAIN, "dispatcher", __VA_ARGS__)
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
#define _NMLOG2_DOMAIN LOGD_DISPATCH
|
|
Packit Service |
a1bd4f |
#define _NMLOG2(level, request_id, log_ifname, log_con_uuid, ...) \
|
|
Packit Service |
a1bd4f |
nm_log((level), \
|
|
Packit Service |
a1bd4f |
_NMLOG2_DOMAIN, \
|
|
Packit Service |
a1bd4f |
(log_ifname), \
|
|
Packit Service |
a1bd4f |
(log_con_uuid), \
|
|
Packit Service |
a1bd4f |
"dispatcher: (%u) " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
|
|
Packit Service |
a1bd4f |
(request_id) _NM_UTILS_MACRO_REST(__VA_ARGS__))
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
#define _NMLOG3_DOMAIN LOGD_DISPATCH
|
|
Packit Service |
a1bd4f |
#define _NMLOG3(level, call_id, ...) \
|
|
Packit Service |
a1bd4f |
G_STMT_START \
|
|
Packit Service |
a1bd4f |
{ \
|
|
Packit Service |
a1bd4f |
const NMDispatcherCallId *const _call_id = (call_id); \
|
|
Packit Service |
a1bd4f |
\
|
|
Packit Service |
a1bd4f |
_NMLOG2(level, \
|
|
Packit Service |
a1bd4f |
_call_id->request_id, \
|
|
Packit Service |
a1bd4f |
_call_id->log_ifname, \
|
|
Packit Service |
a1bd4f |
_call_id->log_con_uuid, \
|
|
Packit Service |
a1bd4f |
__VA_ARGS__); \
|
|
Packit Service |
a1bd4f |
} \
|
|
Packit Service |
a1bd4f |
G_STMT_END
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
struct NMDispatcherCallId {
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback;
|
|
Packit Service |
a1bd4f |
gpointer user_data;
|
|
Packit Service |
a1bd4f |
const char * log_ifname;
|
|
Packit Service |
a1bd4f |
const char * log_con_uuid;
|
|
Packit Service |
a1bd4f |
NMDispatcherAction action;
|
|
Packit Service |
a1bd4f |
guint idle_id;
|
|
Packit Service |
a1bd4f |
guint32 request_id;
|
|
Packit Service |
a1bd4f |
char extra_strings[];
|
|
Packit |
5756e2 |
};
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* FIXME(shutdown): on shutdown, we should not run dispatcher scripts synchronously.
|
|
Packit |
5756e2 |
* Instead, we should of course still run them asynchronously.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Also, we should wait for all pending requests to complete before exiting the main-loop
|
|
Packit |
5756e2 |
* (with a watchdog). If we hit a timeout, we log a warning and quit (but leave the scripts
|
|
Packit |
5756e2 |
* running).
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Finally, cleanup the global structures. */
|
|
Packit |
5756e2 |
static struct {
|
|
Packit Service |
a1bd4f |
GDBusConnection *dbus_connection;
|
|
Packit Service |
a1bd4f |
GHashTable * requests;
|
|
Packit Service |
a1bd4f |
guint request_id_counter;
|
|
Packit |
5756e2 |
} gl;
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static NMDispatcherCallId *
|
|
Packit Service |
a1bd4f |
dispatcher_call_id_new(guint32 request_id,
|
|
Packit Service |
a1bd4f |
NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
const char * log_ifname,
|
|
Packit Service |
a1bd4f |
const char * log_con_uuid)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId *call_id;
|
|
Packit Service |
a1bd4f |
gsize l_log_ifname;
|
|
Packit Service |
a1bd4f |
gsize l_log_con_uuid;
|
|
Packit Service |
a1bd4f |
char * extra_strings;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
l_log_ifname = log_ifname ? (strlen(log_ifname) + 1) : 0u;
|
|
Packit Service |
a1bd4f |
l_log_con_uuid = log_con_uuid ? (strlen(log_con_uuid) + 1) : 0u;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
call_id = g_malloc(sizeof(NMDispatcherCallId) + l_log_ifname + l_log_con_uuid);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
call_id->action = action;
|
|
Packit Service |
a1bd4f |
call_id->request_id = request_id;
|
|
Packit Service |
a1bd4f |
call_id->callback = callback;
|
|
Packit Service |
a1bd4f |
call_id->user_data = user_data;
|
|
Packit Service |
a1bd4f |
call_id->idle_id = 0;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
extra_strings = &call_id->extra_strings[0];
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (log_ifname) {
|
|
Packit Service |
a1bd4f |
call_id->log_ifname = extra_strings;
|
|
Packit Service |
a1bd4f |
memcpy(extra_strings, log_ifname, l_log_ifname);
|
|
Packit Service |
a1bd4f |
extra_strings += l_log_ifname;
|
|
Packit Service |
a1bd4f |
} else
|
|
Packit Service |
a1bd4f |
call_id->log_ifname = NULL;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (log_con_uuid) {
|
|
Packit Service |
a1bd4f |
call_id->log_con_uuid = extra_strings;
|
|
Packit Service |
a1bd4f |
memcpy(extra_strings, log_con_uuid, l_log_con_uuid);
|
|
Packit Service |
a1bd4f |
} else
|
|
Packit Service |
a1bd4f |
call_id->log_con_uuid = NULL;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
return call_id;
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
dispatcher_call_id_free(NMDispatcherCallId *call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
nm_clear_g_source(&call_id->idle_id);
|
|
Packit Service |
a1bd4f |
g_free(call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
_init_dispatcher(void)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
if (G_UNLIKELY(gl.requests == NULL)) {
|
|
Packit Service |
a1bd4f |
gl.requests = g_hash_table_new(nm_direct_hash, NULL);
|
|
Packit Service |
a1bd4f |
gl.dbus_connection = nm_g_object_ref(NM_MAIN_DBUS_CONNECTION_GET);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
if (!gl.dbus_connection)
|
|
Packit Service |
a1bd4f |
_LOGD("No D-Bus connection to talk with NetworkManager-dispatcher service");
|
|
Packit Service |
a1bd4f |
}
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
dump_proxy_to_props(NMProxyConfig *proxy, GVariantBuilder *builder)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
const char *pac_url = NULL, *pac_script = NULL;
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
if (nm_proxy_config_get_method(proxy) == NM_PROXY_CONFIG_METHOD_NONE)
|
|
Packit Service |
a1bd4f |
return;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
pac_url = nm_proxy_config_get_pac_url(proxy);
|
|
Packit Service |
a1bd4f |
if (pac_url) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "pac-url", g_variant_new_string(pac_url));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
pac_script = nm_proxy_config_get_pac_script(proxy);
|
|
Packit Service |
a1bd4f |
if (pac_script) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "pac-script", g_variant_new_string(pac_script));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
dump_ip_to_props(NMIPConfig *ip, GVariantBuilder *builder)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
const int addr_family = nm_ip_config_get_addr_family(ip);
|
|
Packit Service |
a1bd4f |
const int IS_IPv4 = NM_IS_IPv4(addr_family);
|
|
Packit Service |
a1bd4f |
const NMPObject *obj;
|
|
Packit Service |
a1bd4f |
GVariantBuilder int_builder;
|
|
Packit Service |
a1bd4f |
NMDedupMultiIter ipconf_iter;
|
|
Packit Service |
a1bd4f |
GVariant * var1;
|
|
Packit Service |
a1bd4f |
GVariant * var2;
|
|
Packit Service |
a1bd4f |
guint n;
|
|
Packit Service |
a1bd4f |
guint i;
|
|
Packit Service |
a1bd4f |
const NMPObject *default_route;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4)
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("aau"));
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("a(ayuay)"));
|
|
Packit Service |
a1bd4f |
default_route = nm_ip_config_best_default_route_get(ip);
|
|
Packit Service |
a1bd4f |
if (IS_IPv4)
|
|
Packit Service |
a1bd4f |
nm_ip_config_iter_ip4_address_init(&ipconf_iter, NM_IP4_CONFIG(ip));
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
nm_ip_config_iter_ip6_address_init(&ipconf_iter, NM_IP6_CONFIG(ip));
|
|
Packit Service |
a1bd4f |
while (nm_platform_dedup_multi_iter_next_obj(&ipconf_iter,
|
|
Packit Service |
a1bd4f |
&obj,
|
|
Packit Service |
a1bd4f |
NMP_OBJECT_TYPE_IP_ADDRESS(IS_IPv4))) {
|
|
Packit Service |
a1bd4f |
const NMPlatformIPXAddress *addr = NMP_OBJECT_CAST_IPX_ADDRESS(obj);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4) {
|
|
Packit Service |
a1bd4f |
guint32 array[3];
|
|
Packit Service |
a1bd4f |
in_addr_t gw;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
gw = 0u;
|
|
Packit Service |
a1bd4f |
if (default_route) {
|
|
Packit Service |
a1bd4f |
gw = NMP_OBJECT_CAST_IP4_ROUTE(default_route)->gateway;
|
|
Packit Service |
a1bd4f |
default_route = NULL;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
array[0] = addr->a4.address;
|
|
Packit Service |
a1bd4f |
array[1] = addr->a4.plen;
|
|
Packit Service |
a1bd4f |
array[2] = gw;
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(
|
|
Packit Service |
a1bd4f |
&int_builder,
|
|
Packit Service |
a1bd4f |
"@au",
|
|
Packit Service |
a1bd4f |
g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, array, 3, sizeof(guint32)));
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
const struct in6_addr *gw = &in6addr_any;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (default_route) {
|
|
Packit Service |
a1bd4f |
gw = &NMP_OBJECT_CAST_IP6_ROUTE(default_route)->gateway;
|
|
Packit Service |
a1bd4f |
default_route = NULL;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
var1 = nm_g_variant_new_ay_in6addr(&addr->a6.address);
|
|
Packit Service |
a1bd4f |
var2 = nm_g_variant_new_ay_in6addr(gw);
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder, "(@ayu@ay)", var1, addr->a6.plen, var2);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "addresses", g_variant_builder_end(&int_builder));
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4)
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("au"));
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("aay"));
|
|
Packit Service |
a1bd4f |
n = nm_ip_config_get_num_nameservers(ip);
|
|
Packit Service |
a1bd4f |
for (i = 0; i < n; i++) {
|
|
Packit Service |
a1bd4f |
if (IS_IPv4) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder,
|
|
Packit Service |
a1bd4f |
"u",
|
|
Packit Service |
a1bd4f |
nm_ip4_config_get_nameserver(NM_IP4_CONFIG(ip), i));
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
var1 = nm_g_variant_new_ay_in6addr(nm_ip6_config_get_nameserver(NM_IP6_CONFIG(ip), i));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder, "@ay", var1);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "nameservers", g_variant_builder_end(&int_builder));
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("as"));
|
|
Packit Service |
a1bd4f |
n = nm_ip_config_get_num_domains(ip);
|
|
Packit Service |
a1bd4f |
for (i = 0; i < n; i++)
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder, "s", nm_ip_config_get_domain(ip, i));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "domains", g_variant_builder_end(&int_builder));
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("au"));
|
|
Packit Service |
a1bd4f |
n = nm_ip4_config_get_num_wins(NM_IP4_CONFIG(ip));
|
|
Packit Service |
a1bd4f |
for (i = 0; i < n; i++)
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder, "u", nm_ip4_config_get_wins(NM_IP4_CONFIG(ip), i));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "wins-servers", g_variant_builder_end(&int_builder));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4)
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("aau"));
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&int_builder, G_VARIANT_TYPE("a(ayuayu)"));
|
|
Packit Service |
a1bd4f |
if (IS_IPv4)
|
|
Packit Service |
a1bd4f |
nm_ip_config_iter_ip4_route_init(&ipconf_iter, NM_IP4_CONFIG(ip));
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
nm_ip_config_iter_ip6_route_init(&ipconf_iter, NM_IP6_CONFIG(ip));
|
|
Packit Service |
a1bd4f |
while (nm_platform_dedup_multi_iter_next_obj(&ipconf_iter,
|
|
Packit Service |
a1bd4f |
&obj,
|
|
Packit Service |
a1bd4f |
NMP_OBJECT_TYPE_IP_ROUTE(IS_IPv4))) {
|
|
Packit Service |
a1bd4f |
const NMPlatformIPXRoute *route = NMP_OBJECT_CAST_IPX_ROUTE(obj);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT(route))
|
|
Packit Service |
a1bd4f |
continue;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (IS_IPv4) {
|
|
Packit Service |
a1bd4f |
guint32 array[4];
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
array[0] = route->r4.network;
|
|
Packit Service |
a1bd4f |
array[1] = route->r4.plen;
|
|
Packit Service |
a1bd4f |
array[2] = route->r4.gateway;
|
|
Packit Service |
a1bd4f |
array[3] = route->r4.metric;
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(
|
|
Packit Service |
a1bd4f |
&int_builder,
|
|
Packit Service |
a1bd4f |
"@au",
|
|
Packit Service |
a1bd4f |
g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, array, 4, sizeof(guint32)));
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
var1 = nm_g_variant_new_ay_in6addr(&route->r6.network);
|
|
Packit Service |
a1bd4f |
var2 = nm_g_variant_new_ay_in6addr(&route->r6.gateway);
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&int_builder,
|
|
Packit Service |
a1bd4f |
"(@ayu@ayu)",
|
|
Packit Service |
a1bd4f |
var1,
|
|
Packit Service |
a1bd4f |
route->r6.plen,
|
|
Packit Service |
a1bd4f |
var2,
|
|
Packit Service |
a1bd4f |
route->r6.metric);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(builder, "{sv}", "routes", g_variant_builder_end(&int_builder));
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
fill_device_props(NMDevice * device,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *dev_builder,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *proxy_builder,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *ip4_builder,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *ip6_builder,
|
|
Packit Service |
a1bd4f |
GVariant ** dhcp4_props,
|
|
Packit Service |
a1bd4f |
GVariant ** dhcp6_props)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
NMProxyConfig *proxy_config;
|
|
Packit Service |
a1bd4f |
NMIP4Config * ip4_config;
|
|
Packit Service |
a1bd4f |
NMIP6Config * ip6_config;
|
|
Packit Service |
a1bd4f |
NMDhcpConfig * dhcp_config;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* If the action is for a VPN, send the VPN's IP interface instead of the device's */
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(dev_builder,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_DEVICE_PROPS_IP_INTERFACE,
|
|
Packit Service |
a1bd4f |
g_variant_new_string(nm_device_get_ip_iface(device)));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(dev_builder,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_DEVICE_PROPS_INTERFACE,
|
|
Packit Service |
a1bd4f |
g_variant_new_string(nm_device_get_iface(device)));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(dev_builder,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_DEVICE_PROPS_TYPE,
|
|
Packit Service |
a1bd4f |
g_variant_new_uint32(nm_device_get_device_type(device)));
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(dev_builder,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_DEVICE_PROPS_STATE,
|
|
Packit Service |
a1bd4f |
g_variant_new_uint32(nm_device_get_state(device)));
|
|
Packit Service |
a1bd4f |
if (nm_dbus_object_is_exported(NM_DBUS_OBJECT(device))) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(
|
|
Packit Service |
a1bd4f |
dev_builder,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_DEVICE_PROPS_PATH,
|
|
Packit Service |
a1bd4f |
g_variant_new_object_path(nm_dbus_object_get_path(NM_DBUS_OBJECT(device))));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
proxy_config = nm_device_get_proxy_config(device);
|
|
Packit Service |
a1bd4f |
if (proxy_config)
|
|
Packit Service |
a1bd4f |
dump_proxy_to_props(proxy_config, proxy_builder);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
ip4_config = nm_device_get_ip4_config(device);
|
|
Packit Service |
a1bd4f |
if (ip4_config)
|
|
Packit Service |
a1bd4f |
dump_ip_to_props(NM_IP_CONFIG(ip4_config), ip4_builder);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
ip6_config = nm_device_get_ip6_config(device);
|
|
Packit Service |
a1bd4f |
if (ip6_config)
|
|
Packit Service |
a1bd4f |
dump_ip_to_props(NM_IP_CONFIG(ip6_config), ip6_builder);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
dhcp_config = nm_device_get_dhcp_config(device, AF_INET);
|
|
Packit Service |
a1bd4f |
if (dhcp_config)
|
|
Packit Service |
a1bd4f |
*dhcp4_props = nm_g_variant_ref(nm_dhcp_config_get_options(dhcp_config));
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
dhcp_config = nm_device_get_dhcp_config(device, AF_INET6);
|
|
Packit Service |
a1bd4f |
if (dhcp_config)
|
|
Packit Service |
a1bd4f |
*dhcp6_props = nm_g_variant_ref(nm_dhcp_config_get_options(dhcp_config));
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
fill_vpn_props(NMProxyConfig * proxy_config,
|
|
Packit Service |
a1bd4f |
NMIP4Config * ip4_config,
|
|
Packit Service |
a1bd4f |
NMIP6Config * ip6_config,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *proxy_builder,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *ip4_builder,
|
|
Packit Service |
a1bd4f |
GVariantBuilder *ip6_builder)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
if (proxy_config)
|
|
Packit Service |
a1bd4f |
dump_proxy_to_props(proxy_config, proxy_builder);
|
|
Packit Service |
a1bd4f |
if (ip4_config)
|
|
Packit Service |
a1bd4f |
dump_ip_to_props(NM_IP_CONFIG(ip4_config), ip4_builder);
|
|
Packit Service |
a1bd4f |
if (ip6_config)
|
|
Packit Service |
a1bd4f |
dump_ip_to_props(NM_IP_CONFIG(ip6_config), ip6_builder);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static const char *
|
|
Packit Service |
a1bd4f |
dispatch_result_to_string(DispatchResult result)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
switch (result) {
|
|
Packit Service |
a1bd4f |
case DISPATCH_RESULT_UNKNOWN:
|
|
Packit Service |
a1bd4f |
return "unknown";
|
|
Packit Service |
a1bd4f |
case DISPATCH_RESULT_SUCCESS:
|
|
Packit Service |
a1bd4f |
return "success";
|
|
Packit Service |
a1bd4f |
case DISPATCH_RESULT_EXEC_FAILED:
|
|
Packit Service |
a1bd4f |
return "exec failed";
|
|
Packit Service |
a1bd4f |
case DISPATCH_RESULT_FAILED:
|
|
Packit Service |
a1bd4f |
return "failed";
|
|
Packit Service |
a1bd4f |
case DISPATCH_RESULT_TIMEOUT:
|
|
Packit Service |
a1bd4f |
return "timed out";
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
g_assert_not_reached();
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
dispatcher_results_process(guint32 request_id,
|
|
Packit Service |
a1bd4f |
const char *log_ifname,
|
|
Packit Service |
a1bd4f |
const char *log_con_uuid,
|
|
Packit Service |
a1bd4f |
GVariant * v_results)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
nm_auto_free_variant_iter GVariantIter *results = NULL;
|
|
Packit Service |
a1bd4f |
const char * script, *err;
|
|
Packit Service |
a1bd4f |
guint32 result;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_variant_get(v_results, "(a(sus))", &results);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (g_variant_iter_n_children(results) == 0) {
|
|
Packit Service |
a1bd4f |
_LOG2D(request_id, log_ifname, log_con_uuid, "succeeded but no scripts invoked");
|
|
Packit Service |
a1bd4f |
return;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
while (g_variant_iter_next(results, "(&su&s)", &script, &result, &err)) {
|
|
Packit Service |
a1bd4f |
if (result == DISPATCH_RESULT_SUCCESS) {
|
|
Packit Service |
a1bd4f |
_LOG2D(request_id, log_ifname, log_con_uuid, "%s succeeded", script);
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
_LOG2W(request_id,
|
|
Packit Service |
a1bd4f |
log_ifname,
|
|
Packit Service |
a1bd4f |
log_con_uuid,
|
|
Packit Service |
a1bd4f |
"%s failed (%s): %s",
|
|
Packit Service |
a1bd4f |
script,
|
|
Packit Service |
a1bd4f |
dispatch_result_to_string(result),
|
|
Packit Service |
a1bd4f |
err);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
dispatcher_done_cb(GObject *source, GAsyncResult *result, gpointer user_data)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
gs_unref_variant GVariant *ret = NULL;
|
|
Packit Service |
a1bd4f |
gs_free_error GError *error = NULL;
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId * call_id = user_data;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
nm_assert((gpointer) source == gl.dbus_connection);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error);
|
|
Packit Service |
a1bd4f |
if (!ret) {
|
|
Packit Service |
a1bd4f |
if (_nm_dbus_error_has_name(error, "org.freedesktop.systemd1.LoadFailed")) {
|
|
Packit Service |
a1bd4f |
g_dbus_error_strip_remote_error(error);
|
|
Packit Service |
a1bd4f |
_LOG3W(call_id, "failed to call dispatcher scripts: %s", error->message);
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
_LOG3D(call_id, "failed to call dispatcher scripts: %s", error->message);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
dispatcher_results_process(call_id->request_id,
|
|
Packit Service |
a1bd4f |
call_id->log_ifname,
|
|
Packit Service |
a1bd4f |
call_id->log_con_uuid,
|
|
Packit Service |
a1bd4f |
ret);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_hash_table_remove(gl.requests, call_id);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (call_id->callback)
|
|
Packit Service |
a1bd4f |
call_id->callback(call_id, call_id->user_data);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
dispatcher_call_id_free(call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
static const char *action_table[] = {[NM_DISPATCHER_ACTION_HOSTNAME] = NMD_ACTION_HOSTNAME,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_PRE_UP] = NMD_ACTION_PRE_UP,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_UP] = NMD_ACTION_UP,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_PRE_DOWN] = NMD_ACTION_PRE_DOWN,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_DOWN] = NMD_ACTION_DOWN,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_VPN_PRE_UP] = NMD_ACTION_VPN_PRE_UP,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_VPN_UP] = NMD_ACTION_VPN_UP,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_VPN_PRE_DOWN] = NMD_ACTION_VPN_PRE_DOWN,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_VPN_DOWN] = NMD_ACTION_VPN_DOWN,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_DHCP4_CHANGE] = NMD_ACTION_DHCP4_CHANGE,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_DHCP6_CHANGE] = NMD_ACTION_DHCP6_CHANGE,
|
|
Packit Service |
a1bd4f |
[NM_DISPATCHER_ACTION_CONNECTIVITY_CHANGE] =
|
|
Packit Service |
a1bd4f |
NMD_ACTION_CONNECTIVITY_CHANGE};
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static const char *
|
|
Packit Service |
a1bd4f |
action_to_string(NMDispatcherAction action)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
if (G_UNLIKELY((gsize) action >= G_N_ELEMENTS(action_table)))
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(NULL);
|
|
Packit Service |
a1bd4f |
return action_table[(gsize) action];
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static gboolean
|
|
Packit Service |
a1bd4f |
_dispatcher_call(NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
gboolean blocking,
|
|
Packit Service |
a1bd4f |
NMDevice * device,
|
|
Packit Service |
a1bd4f |
NMSettingsConnection *settings_connection,
|
|
Packit Service |
a1bd4f |
NMConnection * applied_connection,
|
|
Packit Service |
a1bd4f |
gboolean activation_type_external,
|
|
Packit Service |
a1bd4f |
NMConnectivityState connectivity_state,
|
|
Packit Service |
a1bd4f |
const char * vpn_iface,
|
|
Packit Service |
a1bd4f |
NMProxyConfig * vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
NMIP4Config * vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
NMIP6Config * vpn_ip6_config,
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId ** out_call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
GVariant * connection_dict;
|
|
Packit Service |
a1bd4f |
GVariantBuilder connection_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder device_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder device_proxy_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder device_ip4_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder device_ip6_props;
|
|
Packit Service |
a1bd4f |
gs_unref_variant GVariant *parameters_floating = NULL;
|
|
Packit Service |
a1bd4f |
gs_unref_variant GVariant *device_dhcp4_props = NULL;
|
|
Packit Service |
a1bd4f |
gs_unref_variant GVariant *device_dhcp6_props = NULL;
|
|
Packit Service |
a1bd4f |
GVariantBuilder vpn_proxy_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder vpn_ip4_props;
|
|
Packit Service |
a1bd4f |
GVariantBuilder vpn_ip6_props;
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId * call_id;
|
|
Packit Service |
a1bd4f |
guint request_id;
|
|
Packit Service |
a1bd4f |
const char * connectivity_state_string = "UNKNOWN";
|
|
Packit Service |
a1bd4f |
const char * log_ifname;
|
|
Packit Service |
a1bd4f |
const char * log_con_uuid;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_return_val_if_fail(!blocking || (!callback && !user_data), FALSE);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
NM_SET_OUT(out_call_id, NULL);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
_init_dispatcher();
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (!gl.dbus_connection)
|
|
Packit Service |
a1bd4f |
return FALSE;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
log_ifname = device ? nm_device_get_iface(device) : NULL;
|
|
Packit Service |
a1bd4f |
log_con_uuid =
|
|
Packit Service |
a1bd4f |
settings_connection ? nm_settings_connection_get_uuid(settings_connection) : NULL;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
request_id = ++gl.request_id_counter;
|
|
Packit Service |
a1bd4f |
if (G_UNLIKELY(!request_id))
|
|
Packit Service |
a1bd4f |
request_id = ++gl.request_id_counter;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* All actions except 'hostname' and 'connectivity-change' require a device */
|
|
Packit Service |
a1bd4f |
if (action == NM_DISPATCHER_ACTION_HOSTNAME
|
|
Packit Service |
a1bd4f |
|| action == NM_DISPATCHER_ACTION_CONNECTIVITY_CHANGE) {
|
|
Packit Service |
a1bd4f |
_LOG2D(request_id,
|
|
Packit Service |
a1bd4f |
log_ifname,
|
|
Packit Service |
a1bd4f |
log_con_uuid,
|
|
Packit Service |
a1bd4f |
"dispatching action '%s'%s",
|
|
Packit Service |
a1bd4f |
action_to_string(action),
|
|
Packit Service |
a1bd4f |
blocking ? " (blocking)" : (callback ? " (with callback)" : ""));
|
|
Packit Service |
a1bd4f |
} else {
|
|
Packit Service |
a1bd4f |
g_return_val_if_fail(NM_IS_DEVICE(device), FALSE);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
_LOG2D(request_id,
|
|
Packit Service |
a1bd4f |
log_ifname,
|
|
Packit Service |
a1bd4f |
log_con_uuid,
|
|
Packit Service |
a1bd4f |
"(%s) dispatching action '%s'%s",
|
|
Packit Service |
a1bd4f |
vpn_iface ?: nm_device_get_iface(device),
|
|
Packit Service |
a1bd4f |
action_to_string(action),
|
|
Packit Service |
a1bd4f |
blocking ? " (blocking)" : (callback ? " (with callback)" : ""));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
if (applied_connection)
|
|
Packit Service |
a1bd4f |
connection_dict =
|
|
Packit Service |
a1bd4f |
nm_connection_to_dbus(applied_connection, NM_CONNECTION_SERIALIZE_NO_SECRETS);
|
|
Packit Service |
a1bd4f |
else
|
|
Packit Service |
a1bd4f |
connection_dict = g_variant_new_array(G_VARIANT_TYPE("{sa{sv}}"), NULL, 0);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&connection_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
if (settings_connection) {
|
|
Packit Service |
a1bd4f |
const char *connection_path;
|
|
Packit Service |
a1bd4f |
const char *filename;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
connection_path = nm_dbus_object_get_path(NM_DBUS_OBJECT(settings_connection));
|
|
Packit Service |
a1bd4f |
if (connection_path) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&connection_props,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_CONNECTION_PROPS_PATH,
|
|
Packit Service |
a1bd4f |
g_variant_new_object_path(connection_path));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
filename = nm_settings_connection_get_filename(settings_connection);
|
|
Packit Service |
a1bd4f |
if (filename) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&connection_props,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_CONNECTION_PROPS_FILENAME,
|
|
Packit Service |
a1bd4f |
g_variant_new_string(filename));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
if (activation_type_external) {
|
|
Packit Service |
a1bd4f |
g_variant_builder_add(&connection_props,
|
|
Packit Service |
a1bd4f |
"{sv}",
|
|
Packit Service |
a1bd4f |
NMD_CONNECTION_PROPS_EXTERNAL,
|
|
Packit Service |
a1bd4f |
g_variant_new_boolean(TRUE));
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&device_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&device_proxy_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&device_ip4_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&device_ip6_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&vpn_proxy_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&vpn_ip4_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
g_variant_builder_init(&vpn_ip6_props, G_VARIANT_TYPE_VARDICT);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* hostname and connectivity-change actions don't send device data */
|
|
Packit Service |
a1bd4f |
if (action != NM_DISPATCHER_ACTION_HOSTNAME
|
|
Packit Service |
a1bd4f |
&& action != NM_DISPATCHER_ACTION_CONNECTIVITY_CHANGE) {
|
|
Packit Service |
a1bd4f |
fill_device_props(device,
|
|
Packit Service |
a1bd4f |
&device_props,
|
|
Packit Service |
a1bd4f |
&device_proxy_props,
|
|
Packit Service |
a1bd4f |
&device_ip4_props,
|
|
Packit Service |
a1bd4f |
&device_ip6_props,
|
|
Packit Service |
a1bd4f |
&device_dhcp4_props,
|
|
Packit Service |
a1bd4f |
&device_dhcp6_props);
|
|
Packit Service |
a1bd4f |
if (vpn_ip4_config || vpn_ip6_config) {
|
|
Packit Service |
a1bd4f |
fill_vpn_props(vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
vpn_ip6_config,
|
|
Packit Service |
a1bd4f |
&vpn_proxy_props,
|
|
Packit Service |
a1bd4f |
&vpn_ip4_props,
|
|
Packit Service |
a1bd4f |
&vpn_ip6_props);
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
connectivity_state_string = nm_connectivity_state_to_string(connectivity_state);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
parameters_floating =
|
|
Packit Service |
a1bd4f |
g_variant_new("(s@a{sa{sv}}a{sv}a{sv}a{sv}a{sv}a{sv}@a{sv}@a{sv}ssa{sv}a{sv}a{sv}b)",
|
|
Packit Service |
a1bd4f |
action_to_string(action),
|
|
Packit Service |
a1bd4f |
connection_dict,
|
|
Packit Service |
a1bd4f |
&connection_props,
|
|
Packit Service |
a1bd4f |
&device_props,
|
|
Packit Service |
a1bd4f |
&device_proxy_props,
|
|
Packit Service |
a1bd4f |
&device_ip4_props,
|
|
Packit Service |
a1bd4f |
&device_ip6_props,
|
|
Packit Service |
a1bd4f |
device_dhcp4_props ?: g_variant_new_array(G_VARIANT_TYPE("{sv}"), NULL, 0),
|
|
Packit Service |
a1bd4f |
device_dhcp6_props ?: g_variant_new_array(G_VARIANT_TYPE("{sv}"), NULL, 0),
|
|
Packit Service |
a1bd4f |
connectivity_state_string,
|
|
Packit Service |
a1bd4f |
vpn_iface ?: "",
|
|
Packit Service |
a1bd4f |
&vpn_proxy_props,
|
|
Packit Service |
a1bd4f |
&vpn_ip4_props,
|
|
Packit Service |
a1bd4f |
&vpn_ip6_props,
|
|
Packit Service |
a1bd4f |
nm_logging_enabled(LOGL_DEBUG, LOGD_DISPATCH));
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* Send the action to the dispatcher */
|
|
Packit Service |
a1bd4f |
if (blocking) {
|
|
Packit Service |
a1bd4f |
gs_unref_variant GVariant *ret = NULL;
|
|
Packit Service |
a1bd4f |
gs_free_error GError *error = NULL;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
ret = g_dbus_connection_call_sync(gl.dbus_connection,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_SERVICE,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_PATH,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_INTERFACE,
|
|
Packit Service |
a1bd4f |
"Action",
|
|
Packit Service |
a1bd4f |
g_steal_pointer(¶meters_floating),
|
|
Packit Service |
a1bd4f |
G_VARIANT_TYPE("(a(sus))"),
|
|
Packit Service |
a1bd4f |
G_DBUS_CALL_FLAGS_NONE,
|
|
Packit Service |
a1bd4f |
CALL_TIMEOUT,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
&error);
|
|
Packit Service |
a1bd4f |
if (!ret) {
|
|
Packit Service |
a1bd4f |
g_dbus_error_strip_remote_error(error);
|
|
Packit Service |
a1bd4f |
_LOG2W(request_id, log_ifname, log_con_uuid, "failed: %s", error->message);
|
|
Packit Service |
a1bd4f |
return FALSE;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
dispatcher_results_process(request_id, log_ifname, log_con_uuid, ret);
|
|
Packit Service |
a1bd4f |
return TRUE;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
call_id =
|
|
Packit Service |
a1bd4f |
dispatcher_call_id_new(request_id, action, callback, user_data, log_ifname, log_con_uuid);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_dbus_connection_call(gl.dbus_connection,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_SERVICE,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_PATH,
|
|
Packit Service |
a1bd4f |
NM_DISPATCHER_DBUS_INTERFACE,
|
|
Packit Service |
a1bd4f |
"Action",
|
|
Packit Service |
a1bd4f |
g_steal_pointer(¶meters_floating),
|
|
Packit Service |
a1bd4f |
G_VARIANT_TYPE("(a(sus))"),
|
|
Packit Service |
a1bd4f |
G_DBUS_CALL_FLAGS_NONE,
|
|
Packit Service |
a1bd4f |
CALL_TIMEOUT,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
dispatcher_done_cb,
|
|
Packit Service |
a1bd4f |
call_id);
|
|
Packit Service |
a1bd4f |
g_hash_table_add(gl.requests, call_id);
|
|
Packit Service |
a1bd4f |
NM_SET_OUT(out_call_id, call_id);
|
|
Packit Service |
a1bd4f |
return TRUE;
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_hostname:
|
|
Packit |
5756e2 |
* @callback: a caller-supplied callback to execute when done
|
|
Packit |
5756e2 |
* @user_data: caller-supplied pointer passed to @callback
|
|
Packit |
5756e2 |
* @out_call_id: on success, a call identifier which can be passed to
|
|
Packit |
5756e2 |
* nm_dispatcher_call_cancel()
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method always invokes the dispatcher action asynchronously.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_hostname(NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId **out_call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(NM_DISPATCHER_ACTION_HOSTNAME,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
NM_CONNECTIVITY_UNKNOWN,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
callback,
|
|
Packit Service |
a1bd4f |
user_data,
|
|
Packit Service |
a1bd4f |
out_call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_device:
|
|
Packit |
5756e2 |
* @action: the %NMDispatcherAction
|
|
Packit |
5756e2 |
* @device: the #NMDevice the action applies to
|
|
Packit |
5756e2 |
* @act_request: the #NMActRequest for the action. If %NULL, use the
|
|
Packit |
5756e2 |
* current request of the device.
|
|
Packit |
5756e2 |
* @callback: a caller-supplied callback to execute when done
|
|
Packit |
5756e2 |
* @user_data: caller-supplied pointer passed to @callback
|
|
Packit |
5756e2 |
* @out_call_id: on success, a call identifier which can be passed to
|
|
Packit |
5756e2 |
* nm_dispatcher_call_cancel()
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method always invokes the device dispatcher action asynchronously. To ignore
|
|
Packit |
5756e2 |
* the result, pass %NULL to @callback.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_device(NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
NMDevice * device,
|
|
Packit Service |
a1bd4f |
NMActRequest * act_request,
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId **out_call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
nm_assert(NM_IS_DEVICE(device));
|
|
Packit Service |
a1bd4f |
if (!act_request) {
|
|
Packit Service |
a1bd4f |
act_request = nm_device_get_act_request(device);
|
|
Packit Service |
a1bd4f |
if (!act_request)
|
|
Packit Service |
a1bd4f |
return FALSE;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
nm_assert(NM_IN_SET(nm_active_connection_get_device(NM_ACTIVE_CONNECTION(act_request)),
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
device));
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(
|
|
Packit Service |
a1bd4f |
action,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
device,
|
|
Packit Service |
a1bd4f |
nm_act_request_get_settings_connection(act_request),
|
|
Packit Service |
a1bd4f |
nm_act_request_get_applied_connection(act_request),
|
|
Packit Service |
a1bd4f |
nm_active_connection_get_activation_type(NM_ACTIVE_CONNECTION(act_request))
|
|
Packit Service |
a1bd4f |
== NM_ACTIVATION_TYPE_EXTERNAL,
|
|
Packit Service |
a1bd4f |
NM_CONNECTIVITY_UNKNOWN,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
callback,
|
|
Packit Service |
a1bd4f |
user_data,
|
|
Packit Service |
a1bd4f |
out_call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_device_sync():
|
|
Packit |
5756e2 |
* @action: the %NMDispatcherAction
|
|
Packit |
5756e2 |
* @device: the #NMDevice the action applies to
|
|
Packit |
5756e2 |
* @act_request: the #NMActRequest for the action. If %NULL, use the
|
|
Packit |
5756e2 |
* current request of the device.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method always invokes the dispatcher action synchronously and it may
|
|
Packit |
5756e2 |
* take a long time to return.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_device_sync(NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
NMDevice * device,
|
|
Packit Service |
a1bd4f |
NMActRequest * act_request)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
nm_assert(NM_IS_DEVICE(device));
|
|
Packit Service |
a1bd4f |
if (!act_request) {
|
|
Packit Service |
a1bd4f |
act_request = nm_device_get_act_request(device);
|
|
Packit Service |
a1bd4f |
if (!act_request)
|
|
Packit Service |
a1bd4f |
return FALSE;
|
|
Packit Service |
a1bd4f |
}
|
|
Packit Service |
a1bd4f |
nm_assert(NM_IN_SET(nm_active_connection_get_device(NM_ACTIVE_CONNECTION(act_request)),
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
device));
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(
|
|
Packit Service |
a1bd4f |
action,
|
|
Packit Service |
a1bd4f |
TRUE,
|
|
Packit Service |
a1bd4f |
device,
|
|
Packit Service |
a1bd4f |
nm_act_request_get_settings_connection(act_request),
|
|
Packit Service |
a1bd4f |
nm_act_request_get_applied_connection(act_request),
|
|
Packit Service |
a1bd4f |
nm_active_connection_get_activation_type(NM_ACTIVE_CONNECTION(act_request))
|
|
Packit Service |
a1bd4f |
== NM_ACTIVATION_TYPE_EXTERNAL,
|
|
Packit Service |
a1bd4f |
NM_CONNECTIVITY_UNKNOWN,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_vpn():
|
|
Packit |
5756e2 |
* @action: the %NMDispatcherAction
|
|
Packit |
5756e2 |
* @settings_connection: the #NMSettingsConnection the action applies to
|
|
Packit |
5756e2 |
* @applied_connection: the currently applied connection
|
|
Packit |
5756e2 |
* @parent_device: the parent #NMDevice of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_iface: the IP interface of the VPN tunnel, if any
|
|
Packit |
5756e2 |
* @vpn_proxy_config: the #NMProxyConfig of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_ip4_config: the #NMIP4Config of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_ip6_config: the #NMIP6Config of the VPN connection
|
|
Packit |
5756e2 |
* @callback: a caller-supplied callback to execute when done
|
|
Packit |
5756e2 |
* @user_data: caller-supplied pointer passed to @callback
|
|
Packit |
5756e2 |
* @out_call_id: on success, a call identifier which can be passed to
|
|
Packit |
5756e2 |
* nm_dispatcher_call_cancel()
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method always invokes the dispatcher action asynchronously. To ignore
|
|
Packit |
5756e2 |
* the result, pass %NULL to @callback.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_vpn(NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
NMSettingsConnection *settings_connection,
|
|
Packit Service |
a1bd4f |
NMConnection * applied_connection,
|
|
Packit Service |
a1bd4f |
NMDevice * parent_device,
|
|
Packit Service |
a1bd4f |
const char * vpn_iface,
|
|
Packit Service |
a1bd4f |
NMProxyConfig * vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
NMIP4Config * vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
NMIP6Config * vpn_ip6_config,
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId ** out_call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(action,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
parent_device,
|
|
Packit Service |
a1bd4f |
settings_connection,
|
|
Packit Service |
a1bd4f |
applied_connection,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
NM_CONNECTIVITY_UNKNOWN,
|
|
Packit Service |
a1bd4f |
vpn_iface,
|
|
Packit Service |
a1bd4f |
vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
vpn_ip6_config,
|
|
Packit Service |
a1bd4f |
callback,
|
|
Packit Service |
a1bd4f |
user_data,
|
|
Packit Service |
a1bd4f |
out_call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_vpn_sync():
|
|
Packit |
5756e2 |
* @action: the %NMDispatcherAction
|
|
Packit |
5756e2 |
* @settings_connection: the #NMSettingsConnection the action applies to
|
|
Packit |
5756e2 |
* @applied_connection: the currently applied connection
|
|
Packit |
5756e2 |
* @parent_device: the parent #NMDevice of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_iface: the IP interface of the VPN tunnel, if any
|
|
Packit |
5756e2 |
* @vpn_proxy_config: the #NMProxyConfig of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_ip4_config: the #NMIP4Config of the VPN connection
|
|
Packit |
5756e2 |
* @vpn_ip6_config: the #NMIP6Config of the VPN connection
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method always invokes the dispatcher action synchronously and it may
|
|
Packit |
5756e2 |
* take a long time to return.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_vpn_sync(NMDispatcherAction action,
|
|
Packit Service |
a1bd4f |
NMSettingsConnection *settings_connection,
|
|
Packit Service |
a1bd4f |
NMConnection * applied_connection,
|
|
Packit Service |
a1bd4f |
NMDevice * parent_device,
|
|
Packit Service |
a1bd4f |
const char * vpn_iface,
|
|
Packit Service |
a1bd4f |
NMProxyConfig * vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
NMIP4Config * vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
NMIP6Config * vpn_ip6_config)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(action,
|
|
Packit Service |
a1bd4f |
TRUE,
|
|
Packit Service |
a1bd4f |
parent_device,
|
|
Packit Service |
a1bd4f |
settings_connection,
|
|
Packit Service |
a1bd4f |
applied_connection,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
NM_CONNECTIVITY_UNKNOWN,
|
|
Packit Service |
a1bd4f |
vpn_iface,
|
|
Packit Service |
a1bd4f |
vpn_proxy_config,
|
|
Packit Service |
a1bd4f |
vpn_ip4_config,
|
|
Packit Service |
a1bd4f |
vpn_ip6_config,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_dispatcher_call_connectivity():
|
|
Packit |
5756e2 |
* @connectivity_state: the #NMConnectivityState value
|
|
Packit |
5756e2 |
* @callback: a caller-supplied callback to execute when done
|
|
Packit |
5756e2 |
* @user_data: caller-supplied pointer passed to @callback
|
|
Packit |
5756e2 |
* @out_call_id: on success, a call identifier which can be passed to
|
|
Packit |
5756e2 |
* nm_dispatcher_call_cancel()
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* This method does not block the caller.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the action was dispatched, %FALSE on failure
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_connectivity(NMConnectivityState connectivity_state,
|
|
Packit Service |
a1bd4f |
NMDispatcherFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer user_data,
|
|
Packit Service |
a1bd4f |
NMDispatcherCallId **out_call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
return _dispatcher_call(NM_DISPATCHER_ACTION_CONNECTIVITY_CHANGE,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
FALSE,
|
|
Packit Service |
a1bd4f |
connectivity_state,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
callback,
|
|
Packit Service |
a1bd4f |
user_data,
|
|
Packit Service |
a1bd4f |
out_call_id);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
void
|
|
Packit Service |
a1bd4f |
nm_dispatcher_call_cancel(NMDispatcherCallId *call_id)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
if (!call_id || g_hash_table_lookup(gl.requests, call_id) != call_id || !call_id->callback)
|
|
Packit Service |
a1bd4f |
g_return_if_reached();
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* Canceling just means the callback doesn't get called, so set the
|
|
Packit Service |
a1bd4f |
* DispatcherInfo's callback to NULL.
|
|
Packit Service |
a1bd4f |
*/
|
|
Packit Service |
a1bd4f |
_LOG3D(call_id, "cancelling dispatcher callback action");
|
|
Packit Service |
a1bd4f |
call_id->callback = NULL;
|
|
Packit |
5756e2 |
}
|