IPv6: Remove local ULA if there is an external one
[project/netifd.git] / system-linux.c
index ebab09c5e36ab849854d5709bafc64433cb2ffaf..d788a01a5d4b0b0e777130d68d31e60f865b370d 100644 (file)
@@ -2,6 +2,7 @@
  * netifd - network interface daemon
  * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
  * Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ * Copyright (C) 2013 Steven Barth <steven@midlink.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -1148,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);