mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 19:10:31 +01:00
platform/trivial: s/ADDRROUTE/OBJECT/ for the cache lookup
It's going to be useful for other objects that have a type (of course) and an ifindex.
This commit is contained in:
parent
18dd937b81
commit
93ac0e455b
11 changed files with 98 additions and 98 deletions
|
|
@ -3020,9 +3020,9 @@ _v4_has_shadowed_routes_detect (NMDevice *self)
|
|||
platform = nm_device_get_platform (self);
|
||||
|
||||
head_entry = nm_platform_lookup (platform,
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex));
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex));
|
||||
if (!head_entry)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2005 - 2014 Red Hat, Inc.
|
||||
* Copyright (C) 2005 - 2017 Red Hat, Inc.
|
||||
* Copyright (C) 2006 - 2008 Novell, Inc.
|
||||
*/
|
||||
|
||||
|
|
@ -611,9 +611,9 @@ nm_ip4_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
|
|||
self = nm_ip4_config_new (multi_idx, ifindex);
|
||||
priv = NM_IP4_CONFIG_GET_PRIVATE (self);
|
||||
|
||||
head_entry = nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex);
|
||||
head_entry = nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex);
|
||||
if (head_entry) {
|
||||
nmp_cache_iter_for_each (&iter, head_entry, &plobj) {
|
||||
if (!_nm_ip_config_add_obj (priv->multi_idx,
|
||||
|
|
@ -636,9 +636,9 @@ nm_ip4_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
|
|||
_notify_addresses (self);
|
||||
}
|
||||
|
||||
head_entry = nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex);
|
||||
head_entry = nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex);
|
||||
|
||||
/* Extract gateway from default route */
|
||||
nmp_cache_iter_for_each (&iter, head_entry, &plobj)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2005 - 2013 Red Hat, Inc.
|
||||
* Copyright (C) 2005 - 2017 Red Hat, Inc.
|
||||
* Copyright (C) 2006 - 2008 Novell, Inc.
|
||||
*/
|
||||
|
||||
|
|
@ -395,9 +395,9 @@ nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
|
|||
self = nm_ip6_config_new (multi_idx, ifindex);
|
||||
priv = NM_IP6_CONFIG_GET_PRIVATE (self);
|
||||
|
||||
head_entry = nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex);
|
||||
head_entry = nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex);
|
||||
if (head_entry) {
|
||||
nmp_cache_iter_for_each (&iter, head_entry, &plobj) {
|
||||
if (!_nm_ip_config_add_obj (priv->multi_idx,
|
||||
|
|
@ -420,9 +420,9 @@ nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
|
|||
_notify_addresses (self);
|
||||
}
|
||||
|
||||
head_entry = nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex);
|
||||
head_entry = nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex);
|
||||
|
||||
nmp_cache_iter_for_each (&iter, head_entry, &plobj)
|
||||
_add_route (self, plobj, NULL, NULL);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2012–2013 Red Hat, Inc.
|
||||
* Copyright (C) 2012–2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
|
@ -1056,11 +1056,11 @@ ipx_address_delete (NMPlatform *platform,
|
|||
peer_addr_i = peer_addr ? *((guint32 *) peer_addr) : 0;
|
||||
|
||||
nmp_cache_iter_for_each (&iter,
|
||||
nm_platform_lookup_addrroute (platform,
|
||||
addr_family == AF_INET
|
||||
? NMP_OBJECT_TYPE_IP4_ADDRESS
|
||||
: NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
0),
|
||||
nm_platform_lookup_object (platform,
|
||||
addr_family == AF_INET
|
||||
? NMP_OBJECT_TYPE_IP4_ADDRESS
|
||||
: NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
0),
|
||||
&o) {
|
||||
const NMPObject *obj_old = NULL;
|
||||
|
||||
|
|
@ -1144,9 +1144,9 @@ ipx_route_delete (NMPlatform *platform,
|
|||
}
|
||||
|
||||
nmp_cache_iter_for_each (&iter,
|
||||
nm_platform_lookup_addrroute (platform,
|
||||
obj_type,
|
||||
ifindex),
|
||||
nm_platform_lookup_object (platform,
|
||||
obj_type,
|
||||
ifindex),
|
||||
&o) {
|
||||
const NMPObject *obj_old = NULL;
|
||||
|
||||
|
|
@ -1254,9 +1254,9 @@ ip_route_add (NMPlatform *platform,
|
|||
gboolean has_route_to_gw = FALSE;
|
||||
|
||||
nmp_cache_iter_for_each (&iter,
|
||||
nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_GET_TYPE (obj),
|
||||
0),
|
||||
nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_GET_TYPE (obj),
|
||||
0),
|
||||
&o) {
|
||||
if (addr_family == AF_INET) {
|
||||
const NMPlatformIP4Route *item = NMP_OBJECT_CAST_IP4_ROUTE (o);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2012-2015 Red Hat, Inc.
|
||||
* Copyright (C) 2012 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
#include "nm-default.h"
|
||||
|
||||
|
|
@ -5878,15 +5878,15 @@ link_can_assume (NMPlatform *platform, int ifindex)
|
|||
if (link->link.master > 0)
|
||||
return TRUE;
|
||||
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex);
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex);
|
||||
if (nmp_cache_lookup (cache, &lookup))
|
||||
return TRUE;
|
||||
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex);
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex);
|
||||
nmp_cache_iter_for_each (&iter,
|
||||
nmp_cache_lookup (cache, &lookup),
|
||||
&o) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2012 Red Hat, Inc.
|
||||
* Copyright (C) 2012 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
|
@ -3346,9 +3346,9 @@ delete_and_next:
|
|||
}
|
||||
|
||||
plat_addresses = nm_platform_lookup_clone (self,
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex),
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
ifindex),
|
||||
NULL, NULL);
|
||||
if (plat_addresses)
|
||||
plat_subnets = ip4_addr_subnets_build_index (plat_addresses, TRUE, TRUE);
|
||||
|
|
@ -3488,9 +3488,9 @@ nm_platform_ip6_address_sync (NMPlatform *self,
|
|||
|
||||
/* Delete unknown addresses */
|
||||
plat_addresses = nm_platform_lookup_clone (self,
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex),
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
ifindex),
|
||||
NULL, NULL);
|
||||
if (plat_addresses) {
|
||||
for (i = 0; i < plat_addresses->len; i++) {
|
||||
|
|
@ -3611,11 +3611,11 @@ nm_platform_ip_route_get_prune_list (NMPlatform *self,
|
|||
NM_IP_ROUTE_TABLE_SYNC_MODE_FULL,
|
||||
NM_IP_ROUTE_TABLE_SYNC_MODE_ALL));
|
||||
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
addr_family == AF_INET
|
||||
? NMP_OBJECT_TYPE_IP4_ROUTE
|
||||
: NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex);
|
||||
nmp_lookup_init_object (&lookup,
|
||||
addr_family == AF_INET
|
||||
? NMP_OBJECT_TYPE_IP4_ROUTE
|
||||
: NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex);
|
||||
head_entry = nm_platform_lookup (self, &lookup);
|
||||
if (!head_entry)
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
* Copyright (C) 2015 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
|
@ -186,7 +186,7 @@ _idx_obj_part (const DedupMultiIdxType *idx_type,
|
|||
}
|
||||
return 1;
|
||||
|
||||
case NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX:
|
||||
case NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX:
|
||||
if ( !NM_IN_SET (NMP_OBJECT_GET_TYPE (obj_a), NMP_OBJECT_TYPE_IP4_ADDRESS,
|
||||
NMP_OBJECT_TYPE_IP6_ADDRESS,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
|
|
@ -1205,13 +1205,13 @@ static const guint8 _supported_cache_ids_link[] = {
|
|||
|
||||
static const guint8 _supported_cache_ids_ipx_address[] = {
|
||||
NMP_CACHE_ID_TYPE_OBJECT_TYPE,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX,
|
||||
0,
|
||||
};
|
||||
|
||||
static const guint8 _supported_cache_ids_ipx_route[] = {
|
||||
NMP_CACHE_ID_TYPE_OBJECT_TYPE,
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX,
|
||||
NMP_CACHE_ID_TYPE_DEFAULT_ROUTES,
|
||||
NMP_CACHE_ID_TYPE_ROUTES_BY_WEAK_ID,
|
||||
0,
|
||||
|
|
@ -1523,9 +1523,9 @@ nmp_lookup_init_link_by_ifname (NMPLookup *lookup,
|
|||
}
|
||||
|
||||
const NMPLookup *
|
||||
nmp_lookup_init_addrroute (NMPLookup *lookup,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex)
|
||||
nmp_lookup_init_object (NMPLookup *lookup,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex)
|
||||
{
|
||||
NMPObject *o;
|
||||
|
||||
|
|
@ -1542,7 +1542,7 @@ nmp_lookup_init_addrroute (NMPLookup *lookup,
|
|||
|
||||
o = _nmp_object_stackinit_from_type (&lookup->selector_obj, obj_type);
|
||||
o->object.ifindex = ifindex;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX;
|
||||
lookup->cache_id_type = NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX;
|
||||
return _L (lookup);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
* Copyright (C) 2015 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NMP_OBJECT_H__
|
||||
|
|
@ -48,12 +48,12 @@ typedef enum { /*< skip >*/
|
|||
* but only route objects can be indexed by NMP_CACHE_ID_TYPE_ROUTES_VISIBLE_NO_DEFAULT.
|
||||
*
|
||||
* Of one index type, there can be multiple indexes or not.
|
||||
* For example, of the index type NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX there
|
||||
* For example, of the index type NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX there
|
||||
* are multiple instances (for different route/addresses, v4/v6, per-ifindex).
|
||||
*
|
||||
* But one object, can only be indexed by one particular index of a
|
||||
* type. For example, a certain address instance is only indexed by
|
||||
* the index NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX with
|
||||
* the index NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX with
|
||||
* matching v4/v6 and ifindex -- or maybe not at all if it isn't visible.
|
||||
* */
|
||||
typedef enum { /*< skip >*/
|
||||
|
|
@ -82,8 +82,8 @@ typedef enum { /*< skip >*/
|
|||
* separate for IPv4 and IPv6. */
|
||||
NMP_CACHE_ID_TYPE_DEFAULT_ROUTES,
|
||||
|
||||
/* all the addresses/routes (by object-type) for an ifindex. */
|
||||
NMP_CACHE_ID_TYPE_ADDRROUTE_BY_IFINDEX,
|
||||
/* all the objects that have an ifindex (by object-type) for an ifindex. */
|
||||
NMP_CACHE_ID_TYPE_OBJECT_BY_IFINDEX,
|
||||
|
||||
/* Consider all the destination fields of a route, that is, the ID without the ifindex
|
||||
* and gateway (meaning: network/plen,metric).
|
||||
|
|
@ -542,9 +542,9 @@ const NMPLookup *nmp_lookup_init_obj_type (NMPLookup *lookup,
|
|||
NMPObjectType obj_type);
|
||||
const NMPLookup *nmp_lookup_init_link_by_ifname (NMPLookup *lookup,
|
||||
const char *ifname);
|
||||
const NMPLookup *nmp_lookup_init_addrroute (NMPLookup *lookup,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex);
|
||||
const NMPLookup *nmp_lookup_init_object (NMPLookup *lookup,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex);
|
||||
const NMPLookup *nmp_lookup_init_route_default (NMPLookup *lookup,
|
||||
NMPObjectType obj_type);
|
||||
const NMPLookup *nmp_lookup_init_route_by_weak_id (NMPLookup *lookup,
|
||||
|
|
@ -723,26 +723,26 @@ nm_platform_lookup_link_by_ifname (NMPlatform *platform,
|
|||
}
|
||||
|
||||
static inline const NMDedupMultiHeadEntry *
|
||||
nm_platform_lookup_addrroute (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex)
|
||||
nm_platform_lookup_object (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex)
|
||||
{
|
||||
NMPLookup lookup;
|
||||
|
||||
nmp_lookup_init_addrroute (&lookup, obj_type, ifindex);
|
||||
nmp_lookup_init_object (&lookup, obj_type, ifindex);
|
||||
return nm_platform_lookup (platform, &lookup);
|
||||
}
|
||||
|
||||
static inline GPtrArray *
|
||||
nm_platform_lookup_addrroute_clone (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex,
|
||||
NMPObjectPredicateFunc predicate,
|
||||
gpointer user_data)
|
||||
nm_platform_lookup_object_clone (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int ifindex,
|
||||
NMPObjectPredicateFunc predicate,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMPLookup lookup;
|
||||
|
||||
nmp_lookup_init_addrroute (&lookup, obj_type, ifindex);
|
||||
nmp_lookup_init_object (&lookup, obj_type, ifindex);
|
||||
return nm_platform_lookup_clone (platform, &lookup, predicate, user_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright 2016 Red Hat, Inc.
|
||||
* Copyright 2016 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
|
@ -77,9 +77,9 @@ _ipx_address_get_all (NMPlatform *self, int ifindex, NMPObjectType obj_type)
|
|||
g_assert (NM_IS_PLATFORM (self));
|
||||
g_assert (ifindex > 0);
|
||||
g_assert (NM_IN_SET (obj_type, NMP_OBJECT_TYPE_IP4_ADDRESS, NMP_OBJECT_TYPE_IP6_ADDRESS));
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
obj_type,
|
||||
ifindex);
|
||||
nmp_lookup_init_object (&lookup,
|
||||
obj_type,
|
||||
ifindex);
|
||||
return nmp_cache_lookup_to_array (nm_platform_lookup (self, &lookup),
|
||||
obj_type,
|
||||
FALSE /*addresses are always visible. */);
|
||||
|
|
@ -107,9 +107,9 @@ nmtstp_platform_ip4_route_delete (NMPlatform *platform, int ifindex, in_addr_t n
|
|||
nm_platform_process_events (platform);
|
||||
|
||||
nm_dedup_multi_iter_for_each (&iter,
|
||||
nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex)) {
|
||||
nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex)) {
|
||||
const NMPlatformIP4Route *r = NMP_OBJECT_CAST_IP4_ROUTE (iter.current->obj);
|
||||
|
||||
if ( r->ifindex != ifindex
|
||||
|
|
@ -133,9 +133,9 @@ nmtstp_platform_ip6_route_delete (NMPlatform *platform, int ifindex, struct in6_
|
|||
nm_platform_process_events (platform);
|
||||
|
||||
nm_dedup_multi_iter_for_each (&iter,
|
||||
nm_platform_lookup_addrroute (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex)) {
|
||||
nm_platform_lookup_object (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex)) {
|
||||
const NMPlatformIP6Route *r = NMP_OBJECT_CAST_IP6_ROUTE (iter.current->obj);
|
||||
|
||||
if ( r->ifindex != ifindex
|
||||
|
|
|
|||
|
|
@ -245,22 +245,22 @@ static inline GPtrArray *
|
|||
nmtstp_ip4_route_get_all (NMPlatform *platform,
|
||||
int ifindex)
|
||||
{
|
||||
return nm_platform_lookup_addrroute_clone (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex,
|
||||
nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel,
|
||||
NULL);
|
||||
return nm_platform_lookup_object_clone (platform,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex,
|
||||
nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static inline GPtrArray *
|
||||
nmtstp_ip6_route_get_all (NMPlatform *platform,
|
||||
int ifindex)
|
||||
{
|
||||
return nm_platform_lookup_addrroute_clone (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex,
|
||||
nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel,
|
||||
NULL);
|
||||
return nm_platform_lookup_object_clone (platform,
|
||||
NMP_OBJECT_TYPE_IP6_ROUTE,
|
||||
ifindex,
|
||||
nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright 2016 Red Hat, Inc.
|
||||
* Copyright 2016 - 2017 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
|
@ -47,9 +47,9 @@ _wait_for_ipv4_addr_device_route (NMPlatform *platform,
|
|||
|
||||
nmp_cache_iter_for_each (&iter,
|
||||
nm_platform_lookup (platform,
|
||||
nmp_lookup_init_addrroute (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex)),
|
||||
nmp_lookup_init_object (&lookup,
|
||||
NMP_OBJECT_TYPE_IP4_ROUTE,
|
||||
ifindex)),
|
||||
&o) {
|
||||
const NMPlatformIP4Route *r = NMP_OBJECT_CAST_IP4_ROUTE (o);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue