netifd: Do not add local/source policy rules multiple times
[project/netifd.git] / system-linux.c
index b190ec6..2b17764 100644 (file)
@@ -1053,7 +1053,7 @@ int system_vlandev_del(struct device *vlandev)
        return system_link_del(vlandev->ifname);
 }
 
-static void
+void
 system_if_get_settings(struct device *dev, struct device_settings *s)
 {
        struct ifreq ifr;
@@ -1792,10 +1792,8 @@ static int system_iprule(struct iprule *rule, int cmd)
                .rtm_flags = 0,
        };
 
-       if (cmd == RTM_NEWRULE) {
+       if (cmd == RTM_NEWRULE)
                rtm.rtm_type = RTN_UNICAST;
-               rtm.rtm_flags |= NLM_F_REPLACE | NLM_F_EXCL;
-       }
 
        if (rule->invert)
                rtm.rtm_flags |= FIB_RULE_INVERT;