Commit 09839d59 authored by Thomas Haller's avatar Thomas Haller

platform: merge branch 'th/platform-rules-cleanup'

https://github.com/NetworkManager/NetworkManager/pull/341
parents 6fe1a38d f41b4cac
Pipeline #30434 failed with stages
in 34 minutes and 12 seconds
......@@ -126,7 +126,19 @@ constructed (GObject *object)
priv->platform_netns = nm_platform_netns_get (priv->platform);
priv->rules_manager = nmp_rules_manager_new (priv->platform, TRUE);
priv->rules_manager = nmp_rules_manager_new (priv->platform);
/* Weakly track the default rules and rules that were added
* outside of NetworkManager. */
nmp_rules_manager_track_default (priv->rules_manager,
AF_UNSPEC,
0,
nm_netns_parent_class /* static dummy user-tag */);
nmp_rules_manager_track_from_platform (priv->rules_manager,
NULL,
AF_UNSPEC,
0,
nm_netns_parent_class /* static dummy user-tag */);
G_OBJECT_CLASS (nm_netns_parent_class)->constructed (object);
}
......
This diff is collapsed.
......@@ -24,8 +24,7 @@
typedef struct _NMPRulesManager NMPRulesManager;
NMPRulesManager *nmp_rules_manager_new (NMPlatform *platform,
gboolean track_default);
NMPRulesManager *nmp_rules_manager_new (NMPlatform *platform);
void nmp_rules_manager_ref (NMPRulesManager *self);
void nmp_rules_manager_unref (NMPRulesManager *self);
......@@ -35,14 +34,20 @@ NM_AUTO_DEFINE_FCN0 (NMPRulesManager *, _nmp_rules_manager_unref, nmp_rules_mana
void nmp_rules_manager_track (NMPRulesManager *self,
const NMPlatformRoutingRule *routing_rule,
gint32 priority,
gint32 track_priority,
gconstpointer user_tag);
void nmp_rules_manager_track_default (NMPRulesManager *self,
int addr_family,
int priority,
gint32 track_priority,
gconstpointer user_tag);
void nmp_rules_manager_track_from_platform (NMPRulesManager *self,
NMPlatform *platform,
int addr_family,
gint32 tracking_priority,
gconstpointer user_tag);
void nmp_rules_manager_untrack (NMPRulesManager *self,
const NMPlatformRoutingRule *routing_rule,
gconstpointer user_tag);
......
......@@ -1511,7 +1511,7 @@ again:
if (TEST_SYNC) {
gs_unref_hashtable GHashTable *unique_priorities = g_hash_table_new (NULL, NULL);
nm_auto_unref_rules_manager NMPRulesManager *rules_manager = nmp_rules_manager_new (platform, FALSE);
nm_auto_unref_rules_manager NMPRulesManager *rules_manager = nmp_rules_manager_new (platform);
gs_unref_ptrarray GPtrArray *objs_sync = NULL;
gconstpointer USER_TAG_1 = &platform;
gconstpointer USER_TAG_2 = &unique_priorities;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment