projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef4b8c8
)
linux: adjust default policy rules
author
Steven Barth
<steven@midlink.org>
Fri, 27 Mar 2015 14:15:59 +0000
(15:15 +0100)
committer
Steven Barth
<steven@midlink.org>
Fri, 27 Mar 2015 14:15:59 +0000
(15:15 +0100)
system-linux.c
patch
|
blob
|
history
diff --git
a/system-linux.c
b/system-linux.c
index
2b52cea
..
e45fc69
100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-43,10
+43,6
@@
#define RTN_FAILED_POLICY 12
#endif
#define RTN_FAILED_POLICY 12
#endif
-#ifndef RT_TABLE_PRELOCAL
-#define RT_TABLE_PRELOCAL 128
-#endif
-
#include <string.h>
#include <fcntl.h>
#include <glob.h>
#include <string.h>
#include <fcntl.h>
#include <glob.h>
@@
-1642,8
+1638,6
@@
bool system_resolve_rt_table(const char *name, unsigned int *id)
table = RT_TABLE_MAIN;
else if (!strcmp(name, "local"))
table = RT_TABLE_LOCAL;
table = RT_TABLE_MAIN;
else if (!strcmp(name, "local"))
table = RT_TABLE_LOCAL;
- else if (!strcmp(name, "prelocal"))
- table = RT_TABLE_PRELOCAL;
/* try to look up name in /etc/iproute2/rt_tables */
else if ((f = fopen("/etc/iproute2/rt_tables", "r")) != NULL)
/* try to look up name in /etc/iproute2/rt_tables */
else if ((f = fopen("/etc/iproute2/rt_tables", "r")) != NULL)
@@
-1804,11
+1798,7
@@
int system_flush_iprules(void)
rule.flags = IPRULE_INET4 | IPRULE_PRIORITY | IPRULE_LOOKUP;
rule.flags = IPRULE_INET4 | IPRULE_PRIORITY | IPRULE_LOOKUP;
- rule.priority = 0;
- rule.lookup = RT_TABLE_PRELOCAL;
- rv |= system_iprule(&rule, RTM_NEWRULE);
-
- rule.priority = 1;
+ rule.priority = 128;
rule.lookup = RT_TABLE_LOCAL;
rv |= system_iprule(&rule, RTM_NEWRULE);
rule.lookup = RT_TABLE_LOCAL;
rv |= system_iprule(&rule, RTM_NEWRULE);
@@
-1823,11
+1813,7
@@
int system_flush_iprules(void)
rule.flags = IPRULE_INET6 | IPRULE_PRIORITY | IPRULE_LOOKUP;
rule.flags = IPRULE_INET6 | IPRULE_PRIORITY | IPRULE_LOOKUP;
- rule.priority = 0;
- rule.lookup = RT_TABLE_PRELOCAL;
- rv |= system_iprule(&rule, RTM_NEWRULE);
-
- rule.priority = 1;
+ rule.priority = 128;
rule.lookup = RT_TABLE_LOCAL;
rv |= system_iprule(&rule, RTM_NEWRULE);
rule.lookup = RT_TABLE_LOCAL;
rv |= system_iprule(&rule, RTM_NEWRULE);