Commit dd9e6463 authored by Thomas Haller's avatar Thomas Haller

platform: minor fixes in NMPRuleManager (assert and types)

- fix the argument type to be "gint32" and not "int".

- assert in nmp_rules_manager_track_default() for the input
  arguments.

- use boolean bitfield in private data.
parent 563894be
......@@ -77,7 +77,7 @@ typedef struct {
CList user_tag_lst;
guint32 track_priority_val;
bool track_priority_present;
bool track_priority_present:1;
bool dirty:1;
} RulesData;
......@@ -551,9 +551,13 @@ nmp_rules_manager_sync (NMPRulesManager *self,
void
nmp_rules_manager_track_default (NMPRulesManager *self,
int addr_family,
int track_priority,
gint32 track_priority,
gconstpointer user_tag)
{
g_return_if_fail (NMP_IS_RULES_MANAGER (self));
nm_assert (NM_IN_SET (addr_family, AF_UNSPEC, AF_INET, AF_INET6));
/* track the default rules. See also `man ip-rule`. */
if (NM_IN_SET (addr_family, AF_UNSPEC, AF_INET)) {
......
......@@ -39,7 +39,7 @@ void nmp_rules_manager_track (NMPRulesManager *self,
void nmp_rules_manager_track_default (NMPRulesManager *self,
int addr_family,
int track_priority,
gint32 track_priority,
gconstpointer user_tag);
void nmp_rules_manager_untrack (NMPRulesManager *self,
......
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