iprule: Insert network and address ip rules before main table lookup rule
authorHans Dedecker <dedeckeh@gmail.com>
Wed, 9 Sep 2015 13:45:48 +0000 (15:45 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 10 Sep 2015 20:49:56 +0000 (22:49 +0200)
Specific IP address and network rules are now checked before the main table lookup as the main table
often holds a default route. As a result the IP address and network rules pointing to a specific
routing table will not be checked anymore; by reversing the order the specific routing tables
are checked first if the ip rule matches.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
iprule.h

index b4b124c3a239350dcc0cf59224b24d5dccea326d..e1ac84b9b074ad30f7618f92e2e77f557ae792e1 100644 (file)
--- a/iprule.h
+++ b/iprule.h
@@ -17,8 +17,8 @@
 
 #include "interface-ip.h"
 
-#define IPRULE_PRIORITY_ADDR 80000
-#define IPRULE_PRIORITY_NW 90000
+#define IPRULE_PRIORITY_ADDR 10000
+#define IPRULE_PRIORITY_NW 20000
 #define IPRULE_PRIORITY_REJECT 4200000000
 
 enum iprule_flags {