From c953b24c651afc47abed8ea63381501aa82eb2e8 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 3 May 2016 23:18:21 +0530 Subject: networkd: add support to set route table networkd: add support to set route table 1. add support to configure the table id. if id is less than 256 we can fit this in the header of route as netlink property is a char. But in kernel this proepty is a unsigned 32. Hence if greater that 256 add this as RTA_TABLE attribute. 2. we are not setting the address family now. Now set this property. --- src/network/networkd-route.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/network/networkd-route.h') diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index a4a4bf2653..3ddeea96b7 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -37,7 +37,7 @@ struct Route { unsigned char protocol; /* RTPROT_* */ unsigned char tos; uint32_t priority; /* note that ip(8) calls this 'metric' */ - unsigned char table; + uint32_t table; unsigned char pref; unsigned flags; @@ -74,3 +74,4 @@ int config_parse_preferred_src(const char *unit, const char *filename, unsigned int config_parse_destination(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_route_priority(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_route_scope(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_route_table(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -- cgit v1.2.3-54-g00ecf