summaryrefslogtreecommitdiffhomepage
path: root/system-linux.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-04-05 13:45:08 +0200
committerJo-Philipp Wich <jow@openwrt.org>2013-04-05 13:54:09 +0200
commit800e5e5f50b62af1b7054f41331a4cc0d7802f65 (patch)
tree7fd7f4ffd5413422b80f8f63371acef55fa0bd79 /system-linux.c
parent8dacaf753b57c703f215b0c844b412b64183ac81 (diff)
Maintain config order of ip rules unless user explicitely provides priority
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c
index 87a4efa..d788a01 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1149,6 +1149,8 @@ static int system_iprule(struct iprule *rule, int cmd)
if (rule->flags & IPRULE_PRIORITY)
nla_put_u32(msg, FRA_PRIORITY, rule->priority);
+ else if (cmd == RTM_NEWRULE)
+ nla_put_u32(msg, FRA_PRIORITY, rule->order);
if (rule->flags & IPRULE_FWMARK)
nla_put_u32(msg, FRA_FWMARK, rule->fwmark);