diff options
| author | Michael Biebl <biebl@debian.org> | 2023-01-26 21:18:45 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-01-26 21:18:45 +0100 |
| commit | 40ec077ea305994c1fc2130add6787ca0c73e2c6 (patch) | |
| tree | 7694e44c64d371a1f8e57b891ef9846143108996 /src | |
| parent | 5d9e3721ad196595acd064e0d3ce66edc2613e51 (diff) | |
New upstream version 1.40.12 upstream/1.40.12
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/devices/nm-device.c | 2 | ||||
| -rw-r--r-- | src/core/devices/ovs/nm-ovsdb.c | 70 | ||||
| -rw-r--r-- | src/core/nm-config.c | 4 | ||||
| -rw-r--r-- | src/core/nm-connectivity.c | 6 | ||||
| -rw-r--r-- | src/core/nm-core-utils.h | 6 | ||||
| -rw-r--r-- | src/core/nm-firewall-utils.c | 32 | ||||
| -rw-r--r-- | src/core/platform/tests/test-common.c | 11 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-version-macros.h | 2 | ||||
| -rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 59 | ||||
| -rw-r--r-- | src/libnm-platform/nmp-object.c | 42 | ||||
| -rw-r--r-- | src/libnm-platform/nmp-object.h | 14 | ||||
| -rw-r--r-- | src/nm-cloud-setup/nm-http-client.c | 5 |
12 files changed, 150 insertions, 103 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index a723bf7f..c4f0f9a2 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -15043,7 +15043,7 @@ nm_device_recheck_available_connections(NMDevice *self) if (nm_device_check_connection_available(self, nm_settings_connection_get_connection(sett_conn), - NM_DEVICE_CHECK_CON_AVAILABLE_NONE, + _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST, NULL, NULL)) { if (available_connections_add(self, sett_conn)) diff --git a/src/core/devices/ovs/nm-ovsdb.c b/src/core/devices/ovs/nm-ovsdb.c index d3e858a1..0d688396 100644 --- a/src/core/devices/ovs/nm-ovsdb.c +++ b/src/core/devices/ovs/nm-ovsdb.c @@ -592,21 +592,30 @@ _set_bridge_ports(json_t *params, const char *ifname, json_t *new_ports) static void _set_bridge_mac(json_t *params, const char *ifname, const char *mac) { - json_array_append_new(params, - json_pack("{s:s, s:s, s:{s:[s, [[s, s]]]}, s:[[s, s, s]]}", - "op", - "update", - "table", - "Bridge", - "row", - "other_config", - "map", - "hwaddr", - mac, - "where", - "name", - "==", - ifname)); + json_array_append_new( + params, + json_pack("{s:s, s:s, s:[[s, s, [s, [s]]], [s, s, [s, [[s, s]]]]], s:[[s, s, s]]}", + "op", + "mutate", + "table", + "Bridge", + "mutations", + + "other_config", + "delete", + "set", + "hwaddr", + + "other_config", + "insert", + "map", + "hwaddr", + mac, + + "where", + "name", + "==", + ifname)); } /** @@ -714,26 +723,27 @@ _j_create_external_ids_array_update(const char *connection_uuid, mutations = json_array(); + array = json_array(); if (exid_old) { - array = NULL; g_hash_table_iter_init(&iter, exid_old); while (g_hash_table_iter_next(&iter, (gpointer *) &key, NULL)) { - if (nm_g_hash_table_contains(exid_new, key)) - continue; - if (NM_STR_HAS_PREFIX(key, NM_OVS_EXTERNAL_ID_NM_PREFIX)) - continue; - - if (!array) - array = json_array(); - json_array_append_new(array, json_string(key)); } - if (array) { - json_array_append_new( - mutations, - json_pack("[s, s, [s, o]]", "external_ids", "delete", "set", array)); + } + if (exid_new) { + g_hash_table_iter_init(&iter, exid_new); + while (g_hash_table_iter_next(&iter, (gpointer *) &key, NULL)) { + if (nm_g_hash_table_contains(exid_old, key)) + continue; + json_array_append_new(array, json_string(key)); } } + if (!nm_g_hash_table_contains(exid_old, NM_OVS_EXTERNAL_ID_NM_PREFIX) + && !nm_g_hash_table_contains(exid_new, NM_OVS_EXTERNAL_ID_NM_PREFIX)) { + json_array_append_new(array, json_string(NM_OVS_EXTERNAL_ID_NM_PREFIX)); + } + json_array_append_new(mutations, + json_pack("[s, s, [s, o]]", "external_ids", "delete", "set", array)); array = json_array(); @@ -1569,9 +1579,9 @@ _external_ids_to_string(const GArray *arr) if (i > 0) nm_str_buf_append_c(&strbuf, ','); - nm_str_buf_append_printf(&strbuf, " \"%s\" = \"%s\"]", n->name, n->value_str); + nm_str_buf_append_printf(&strbuf, " \"%s\" = \"%s\" ", n->name, n->value_str); } - nm_str_buf_append(&strbuf, " ]"); + nm_str_buf_append(&strbuf, "]"); return nm_str_buf_finalize(&strbuf, NULL); } diff --git a/src/core/nm-config.c b/src/core/nm-config.c index 3d23d4f6..62e4e7ea 100644 --- a/src/core/nm-config.c +++ b/src/core/nm-config.c @@ -1509,8 +1509,8 @@ nm_config_keyfile_has_global_dns_config(GKeyFile *keyfile, gboolean internal) if (!keyfile) return FALSE; if (g_key_file_has_group(keyfile, - internal ? NM_CONFIG_KEYFILE_GROUP_GLOBAL_DNS - : NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS)) + internal ? NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS + : NM_CONFIG_KEYFILE_GROUP_GLOBAL_DNS)) return TRUE; groups = g_key_file_get_groups(keyfile, NULL); diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c index cd30853d..c0e77e35 100644 --- a/src/core/nm-connectivity.c +++ b/src/core/nm-connectivity.c @@ -767,7 +767,13 @@ do_curl_request(NMConnectivityCheckHandle *cb_data, const char *hosts) curl_easy_setopt(ehandle, CURLOPT_INTERFACE, cb_data->ifspec); curl_easy_setopt(ehandle, CURLOPT_RESOLVE, cb_data->concheck.hosts); curl_easy_setopt(ehandle, CURLOPT_IPRESOLVE, resolve); + +#if LIBCURL_VERSION_NUM >= 0x075500 /* libcurl 7.85.0 */ + curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS"); +#else curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); +#endif + if (_LOGT_ENABLED() && easy_debug_enabled()) { curl_easy_setopt(ehandle, CURLOPT_DEBUGFUNCTION, easy_debug_cb); curl_easy_setopt(ehandle, CURLOPT_DEBUGDATA, cb_data); diff --git a/src/core/nm-core-utils.h b/src/core/nm-core-utils.h index d1a62a60..483af077 100644 --- a/src/core/nm-core-utils.h +++ b/src/core/nm-core-utils.h @@ -154,7 +154,7 @@ nm_utils_ip_route_metric_penalize(guint32 metric, guint32 penalty) void nm_utils_kill_process_sync(pid_t pid, guint64 start_time, int sig, - guint64 log_domain, + NMLogDomain log_domain, const char *log_name, guint32 wait_before_kill_msec, guint32 sleep_duration_msec, @@ -166,14 +166,14 @@ typedef void (*NMUtilsKillChildAsyncCb)(pid_t pid, void *user_data); void nm_utils_kill_child_async(pid_t pid, int sig, - guint64 log_domain, + NMLogDomain log_domain, const char *log_name, guint32 wait_before_kill_msec, NMUtilsKillChildAsyncCb callback, void *user_data); gboolean nm_utils_kill_child_sync(pid_t pid, int sig, - guint64 log_domain, + NMLogDomain log_domain, const char *log_name, int *child_status, guint32 wait_before_kill_msec, diff --git a/src/core/nm-firewall-utils.c b/src/core/nm-firewall-utils.c index e482ab96..4bcde85f 100644 --- a/src/core/nm-firewall-utils.c +++ b/src/core/nm-firewall-utils.c @@ -147,12 +147,13 @@ _share_iptables_call_v(const char *const *argv) return TRUE; } -#define _share_iptables_call(...) _share_iptables_call_v(NM_MAKE_STRV(__VA_ARGS__)) +#define _share_iptables_call(...) \ + _share_iptables_call_v(NM_MAKE_STRV("" IPTABLES_PATH "", "--wait", "2", __VA_ARGS__)) static gboolean _share_iptables_chain_op(const char *table, const char *chain, const char *op) { - return _share_iptables_call("" IPTABLES_PATH "", "--table", table, op, chain); + return _share_iptables_call("--table", table, op, chain); } static gboolean @@ -181,8 +182,7 @@ _share_iptables_set_masquerade_sync(gboolean up, const char *ip_iface, in_addr_t comment_name = _share_iptables_get_name(FALSE, "nm-shared", ip_iface); _share_iptables_subnet_to_str(str_subnet, addr, plen); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "nat", up ? "--insert" : "--delete", "POSTROUTING", @@ -232,8 +232,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, _share_iptables_chain_add("filter", chain_input); for (i = 0; i < (int) G_N_ELEMENTS(input_params); i++) { - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_input, @@ -247,8 +246,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, _share_iptables_chain_add("filter", chain_forward); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_forward, @@ -262,8 +260,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, "ESTABLISHED,RELATED", "--jump", "ACCEPT"); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_forward, @@ -273,8 +270,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, ip_iface, "--jump", "ACCEPT"); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_forward, @@ -284,8 +280,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, ip_iface, "--jump", "ACCEPT"); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_forward, @@ -293,8 +288,7 @@ _share_iptables_set_shared_chains_add(const char *chain_input, ip_iface, "--jump", "REJECT"); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", "--append", chain_forward, @@ -325,8 +319,7 @@ _share_iptables_set_shared_sync(gboolean up, const char *ip_iface, in_addr_t add if (up) _share_iptables_set_shared_chains_add(chain_input, chain_forward, ip_iface, addr, plen); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", up ? "--insert" : "--delete", "INPUT", @@ -339,8 +332,7 @@ _share_iptables_set_shared_sync(gboolean up, const char *ip_iface, in_addr_t add "--comment", comment_name); - _share_iptables_call("" IPTABLES_PATH "", - "--table", + _share_iptables_call("--table", "filter", up ? "--insert" : "--delete", "FORWARD", diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c index 34ec5cc2..b5bb1232 100644 --- a/src/core/platform/tests/test-common.c +++ b/src/core/platform/tests/test-common.c @@ -12,6 +12,7 @@ #include <sys/wait.h> #include <fcntl.h> #include <linux/if_tun.h> +#include <linux/rtnetlink.h> #include "n-acd/src/n-acd.h" @@ -540,7 +541,7 @@ _ip4_route_get(NMPlatform *platform, _init_platform(&platform, FALSE); - nmp_lookup_init_ip4_route_by_weak_id(&lookup, network, plen, metric, tos); + nmp_lookup_init_ip4_route_by_weak_id(&lookup, RT_TABLE_MAIN, network, plen, metric, tos); c = 0; nmp_cache_iter_for_each (&iter, nm_platform_lookup(platform, &lookup), &o) { @@ -633,7 +634,13 @@ _ip6_route_get(NMPlatform *platform, _init_platform(&platform, FALSE); - nmp_lookup_init_ip6_route_by_weak_id(&lookup, network, plen, metric, src, src_plen); + nmp_lookup_init_ip6_route_by_weak_id(&lookup, + RT_TABLE_MAIN, + network, + plen, + metric, + src, + src_plen); c = 0; nmp_cache_iter_for_each (&iter, nm_platform_lookup(platform, &lookup), &o) { diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h index f95ca8ae..f3d50252 100644 --- a/src/libnm-core-public/nm-version-macros.h +++ b/src/libnm-core-public/nm-version-macros.h @@ -30,7 +30,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (10) +#define NM_MICRO_VERSION (12) /** * NM_CHECK_VERSION: diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index eb7c671b..b798d12d 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -711,6 +711,9 @@ wait_for_nl_response_to_string(WaitForNlResponseResult seq_result, case WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_UNKNOWN: nm_strbuf_append_str(&buf, &buf_size, "failure"); break; + case WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC: + nm_strbuf_append_str(&buf, &buf_size, "failed-resync"); + break; default: if (seq_result < 0) { nm_strbuf_append(&buf, @@ -7893,20 +7896,25 @@ do_change_link(NMPlatform *platform, WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; gs_free char *errmsg = NULL; char s_buf[256]; - int result = 0; - NMLogLevel log_level = LOGL_DEBUG; - const char *log_result = "failure"; - const char *log_detail = ""; + int result; + NMLogLevel log_level; + const char *log_detail; gs_free char *log_detail_free = NULL; const NMPObject *obj_cache; if (!nm_platform_netns_push(platform, &netns)) { log_level = LOGL_ERR; log_detail = ", failure to change network namespace"; + result = -NME_UNSPEC; goto out; } retry: + result = -NME_UNSPEC; + log_level = LOGL_WARN; + log_detail = ""; + nm_clear_g_free(&log_detail_free); + nle = _netlink_send_nlmsg_rtnl(platform, nlmsg, &seq_result, &errmsg); if (nle < 0) { log_level = LOGL_ERR; @@ -7924,53 +7932,54 @@ retry: nm_assert(seq_result); - if (NM_IN_SET(-((int) seq_result), EOPNOTSUPP) && nlmsg_hdr(nlmsg)->nlmsg_type == RTM_NEWLINK) { + if (NM_IN_SET(seq_result, WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK, -EEXIST, -EADDRINUSE)) { + log_level = LOGL_DEBUG; + result = 0; + } else if (NM_IN_SET(seq_result, -EOPNOTSUPP) && nlmsg_hdr(nlmsg)->nlmsg_type == RTM_NEWLINK) { nlmsg_hdr(nlmsg)->nlmsg_type = RTM_SETLINK; - goto retry; - } - if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) { - log_result = "success"; - } else if (NM_IN_SET(-((int) seq_result), EEXIST, EADDRINUSE)) { - /* */ - } else if (NM_IN_SET(-((int) seq_result), ESRCH, ENOENT)) { + log_level = LOGL_INFO; + log_detail = ", will try SETLINK instead of NEWLINK"; + result = -EAGAIN; + } else if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC) { + log_level = LOGL_INFO; + log_detail = ", due to lost synchronization"; + result = -EAGAIN; + } else if (NM_IN_SET(seq_result, -ESRCH, -ENOENT)) { log_detail = ", firmware not found"; result = -NME_PL_NO_FIRMWARE; - } else if (NM_IN_SET(-((int) seq_result), ERANGE) - && change_link_type == CHANGE_LINK_TYPE_SET_MTU) { + } else if (NM_IN_SET(seq_result, -ERANGE) && change_link_type == CHANGE_LINK_TYPE_SET_MTU) { log_detail = ", setting MTU to requested size is not possible"; result = -NME_PL_CANT_SET_MTU; - } else if (NM_IN_SET(-((int) seq_result), ENFILE) - && change_link_type == CHANGE_LINK_TYPE_SET_ADDRESS + } else if (NM_IN_SET(seq_result, -ENFILE) && change_link_type == CHANGE_LINK_TYPE_SET_ADDRESS && (obj_cache = nmp_cache_lookup_link(nm_platform_get_cache(platform), ifindex)) && obj_cache->link.l_address.len == data->set_address.length && memcmp(obj_cache->link.l_address.data, data->set_address.address, data->set_address.length) == 0) { - /* workaround ENFILE which may be wrongly returned (bgo #770456). + /* work around ENFILE which may be wrongly returned (bgo #770456). * If the MAC address is as expected, assume success? */ - log_result = "success"; log_detail = " (assume success changing address)"; result = 0; - } else if (NM_IN_SET(-((int) seq_result), ENODEV)) { + } else if (NM_IN_SET(seq_result, -ENODEV)) { log_level = LOGL_DEBUG; result = -NME_PL_NOT_FOUND; - } else if (-((int) seq_result) == EAFNOSUPPORT) { + } else if (seq_result == -EAFNOSUPPORT) { log_level = LOGL_DEBUG; result = -NME_PL_OPNOTSUPP; - } else { - log_level = LOGL_WARN; - result = -NME_UNSPEC; } out: _NMLOG(log_level, - "do-change-link[%d]: %s changing link: %s%s", + "do-change-link[%d]: %s%s", ifindex, - log_result, wait_for_nl_response_to_string(seq_result, errmsg, s_buf, sizeof(s_buf)), log_detail); + + if (result == -EAGAIN) + goto retry; + return result; } diff --git a/src/libnm-platform/nmp-object.c b/src/libnm-platform/nmp-object.c index 6609a7d5..db7bd314 100644 --- a/src/libnm-platform/nmp-object.c +++ b/src/libnm-platform/nmp-object.c @@ -2204,19 +2204,23 @@ nmp_lookup_init_route_by_weak_id(NMPLookup *lookup, const NMPObject *obj) switch (NMP_OBJECT_GET_TYPE(obj)) { case NMP_OBJECT_TYPE_IP4_ROUTE: r4 = NMP_OBJECT_CAST_IP4_ROUTE(obj); - return nmp_lookup_init_ip4_route_by_weak_id(lookup, - r4->network, - r4->plen, - r4->metric, - r4->tos); + return nmp_lookup_init_ip4_route_by_weak_id( + lookup, + nm_platform_route_table_uncoerce(r4->table_coerced, TRUE), + r4->network, + r4->plen, + r4->metric, + r4->tos); case NMP_OBJECT_TYPE_IP6_ROUTE: r6 = NMP_OBJECT_CAST_IP6_ROUTE(obj); - return nmp_lookup_init_ip6_route_by_weak_id(lookup, - &r6->network, - r6->plen, - r6->metric, - &r6->src, - r6->src_plen); + return nmp_lookup_init_ip6_route_by_weak_id( + lookup, + nm_platform_route_table_uncoerce(r6->table_coerced, TRUE), + &r6->network, + r6->plen, + r6->metric, + &r6->src, + r6->src_plen); default: nm_assert_not_reached(); return NULL; @@ -2225,6 +2229,7 @@ nmp_lookup_init_route_by_weak_id(NMPLookup *lookup, const NMPObject *obj) const NMPLookup * nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, + guint32 route_table, in_addr_t network, guint plen, guint32 metric, @@ -2235,9 +2240,10 @@ nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, nm_assert(lookup); o = _nmp_object_stackinit_from_type(&lookup->selector_obj, NMP_OBJECT_TYPE_IP4_ROUTE); - o->ip4_route.ifindex = 1; - o->ip4_route.plen = plen; - o->ip4_route.metric = metric; + o->ip4_route.ifindex = 1; + o->ip4_route.plen = plen; + o->ip4_route.table_coerced = nm_platform_route_table_coerce(route_table); + o->ip4_route.metric = metric; if (network) o->ip4_route.network = network; o->ip4_route.tos = tos; @@ -2247,6 +2253,7 @@ nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, const NMPLookup * nmp_lookup_init_ip6_route_by_weak_id(NMPLookup *lookup, + guint32 route_table, const struct in6_addr *network, guint plen, guint32 metric, @@ -2258,9 +2265,10 @@ nmp_lookup_init_ip6_route_by_weak_id(NMPLookup *lookup, nm_assert(lookup); o = _nmp_object_stackinit_from_type(&lookup->selector_obj, NMP_OBJECT_TYPE_IP6_ROUTE); - o->ip6_route.ifindex = 1; - o->ip6_route.plen = plen; - o->ip6_route.metric = metric; + o->ip6_route.ifindex = 1; + o->ip6_route.plen = plen; + o->ip6_route.table_coerced = nm_platform_route_table_coerce(route_table); + o->ip6_route.metric = metric; if (network) o->ip6_route.network = *network; if (src) diff --git a/src/libnm-platform/nmp-object.h b/src/libnm-platform/nmp-object.h index 4958404a..25156fe2 100644 --- a/src/libnm-platform/nmp-object.h +++ b/src/libnm-platform/nmp-object.h @@ -811,11 +811,13 @@ nmp_lookup_init_object_by_ifindex(NMPLookup *lookup, NMPObjectType obj_type, int const NMPLookup *nmp_lookup_init_route_default(NMPLookup *lookup, NMPObjectType obj_type); const NMPLookup *nmp_lookup_init_route_by_weak_id(NMPLookup *lookup, const NMPObject *obj); const NMPLookup *nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, + guint32 route_table, in_addr_t network, guint plen, guint32 metric, guint8 tos); const NMPLookup *nmp_lookup_init_ip6_route_by_weak_id(NMPLookup *lookup, + guint32 route_table, const struct in6_addr *network, guint plen, guint32 metric, @@ -1074,6 +1076,7 @@ nm_platform_lookup_route_default_clone(NMPlatform *platform, static inline const NMDedupMultiHeadEntry * nm_platform_lookup_ip4_route_by_weak_id(NMPlatform *platform, + guint32 route_table, in_addr_t network, guint plen, guint32 metric, @@ -1081,12 +1084,13 @@ nm_platform_lookup_ip4_route_by_weak_id(NMPlatform *platform, { NMPLookup lookup; - nmp_lookup_init_ip4_route_by_weak_id(&lookup, network, plen, metric, tos); + nmp_lookup_init_ip4_route_by_weak_id(&lookup, route_table, network, plen, metric, tos); return nm_platform_lookup(platform, &lookup); } static inline const NMDedupMultiHeadEntry * nm_platform_lookup_ip6_route_by_weak_id(NMPlatform *platform, + guint32 route_table, const struct in6_addr *network, guint plen, guint32 metric, @@ -1095,7 +1099,13 @@ nm_platform_lookup_ip6_route_by_weak_id(NMPlatform *platform, { NMPLookup lookup; - nmp_lookup_init_ip6_route_by_weak_id(&lookup, network, plen, metric, src, src_plen); + nmp_lookup_init_ip6_route_by_weak_id(&lookup, + route_table, + network, + plen, + metric, + src, + src_plen); return nm_platform_lookup(platform, &lookup); } diff --git a/src/nm-cloud-setup/nm-http-client.c b/src/nm-cloud-setup/nm-http-client.c index a0053d47..a0964e21 100644 --- a/src/nm-cloud-setup/nm-http-client.c +++ b/src/nm-cloud-setup/nm-http-client.c @@ -305,7 +305,12 @@ nm_http_client_get(NMHttpClient *self, curl_easy_setopt(edata->ehandle, CURLOPT_WRITEFUNCTION, _get_writefunction_cb); curl_easy_setopt(edata->ehandle, CURLOPT_WRITEDATA, edata); curl_easy_setopt(edata->ehandle, CURLOPT_PRIVATE, edata); + +#if LIBCURL_VERSION_NUM >= 0x075500 /* libcurl 7.85.0 */ + curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS"); +#else curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); +#endif if (http_headers) { for (i = 0; http_headers[i]; ++i) { |