From f02ba163891bab73a80332b4599a9d73083cb6c2 Mon Sep 17 00:00:00 2001 From: Daniel Dao Date: Mon, 26 Feb 2018 14:33:16 +0000 Subject: setup route expiration in kernel if supported kernel >= 4.5 (with commit https://github.com/torvalds/linux/commit/32bc201e1974976b7d3fea9a9b17bb7392ca6394) supports RTA_EXPIRES netlink attribute to set router lifetime. This simply detect the kernel version (>=4.5) and set the lifetime properly, fallback to expiring route in userspace for kernel that doesnt support it. Signed-off-by: Daniel Dao --- src/network/networkd-util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network/networkd-util.h') diff --git a/src/network/networkd-util.h b/src/network/networkd-util.h index 69ea93ad08..e8c3399937 100644 --- a/src/network/networkd-util.h +++ b/src/network/networkd-util.h @@ -37,3 +37,5 @@ int config_parse_address_family_boolean_with_kernel(const char* unit, const char const char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_; AddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_; + +int kernel_route_expiration_supported(void); -- cgit v1.2.1