#include "system.h"
struct vlist_tree iprules;
-static bool iprules_flushed = false;
static unsigned int iprules_counter[2];
enum {
rule->flags |= IPRULE_GOTO;
}
- /* trigger flush of existing rules when adding first uci rule the first time */
- if (!iprules_flushed)
- {
- system_flush_iprules();
- iprules_flushed = true;
- }
-
vlist_add(&iprules, &rule->node, &rule->flags);
return;
static char dev_buf[256];
+static bool iprules_flushed = false;
+
static void
handler_nl_event(struct uloop_fd *u, unsigned int events)
{
int system_add_iprule(struct iprule *rule)
{
+ /* trigger flush of existing rules when adding first rule the first time */
+ if (!iprules_flushed)
+ {
+ system_flush_iprules();
+ iprules_flushed = true;
+ }
+
return system_iprule(rule, RTM_NEWRULE);
}