projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae3c689
)
netifd: Check rt_table parameter when comparing routes
author
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 7 Apr 2014 11:30:50 +0000
(13:30 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 26 Apr 2014 19:37:41 +0000
(21:37 +0200)
Allows to add identical routes in different routing tables
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface-ip.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index b000725e3ec1f51e4f8b711c39dc8d445829f3eb..208ec3f0e723dd65ae0dafd8d738538228c03e2b 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-400,6
+400,9
@@
route_cmp(const void *k1, const void *k2, void *ptr)
if (r1->sourcemask != r2->sourcemask)
return r1->sourcemask - r2->sourcemask;
+ if (r1->table != r2->table)
+ return r1->table - r2->table;
+
int maskcmp = memcmp(&r1->source, &r2->source, sizeof(r1->source));
if (maskcmp)
return maskcmp;