projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ad4486
)
network: use VRF's route table if VRF= is set
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 26 Feb 2020 06:42:32 +0000
(15:42 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 26 Feb 2020 06:50:28 +0000
(15:50 +0900)
Fixes #14940.
src/network/networkd-route.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-route.c
b/src/network/networkd-route.c
index e924723e5d903d6ca05a1de6f13942858656df8b..de532eee7aa128bf7ff840512914694cc3e222f6 100644
(file)
--- a/
src/network/networkd-route.c
+++ b/
src/network/networkd-route.c
@@
-17,7
+17,7
@@
#include "string-util.h"
#include "strxcpyx.h"
#include "sysctl-util.h"
-#include "
util
.h"
+#include "
vrf
.h"
#define ROUTES_DEFAULT_MAX_PER_FAMILY 4096U
@@
-1700,6
+1700,11
@@
int route_section_verify(Route *route, Network *network) {
route->section->filename, route->section->line);
}
+ if (!route->table_set && network->vrf) {
+ route->table = VRF(network->vrf)->table;
+ route->table_set = true;
+ }
+
if (!route->table_set && IN_SET(route->type, RTN_LOCAL, RTN_BROADCAST, RTN_ANYCAST, RTN_NAT))
route->table = RT_TABLE_LOCAL;