summaryrefslogtreecommitdiff
path: root/src/network/networkd-route.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-26 12:29:37 +0100
committerTom Gundersen <teg@jklm.no>2015-10-30 12:32:49 +0100
commitf833694d4f6a6dffabc6a4e552ecbd40aa3ce479 (patch)
treecae41cb509957b305446c0c3921b35b1497d0b10 /src/network/networkd-route.h
parentf703cc2c5756088605a37d7d9a9b84e719b667f5 (diff)
networkd: route - add expiration support
This should really live in the kernel, but the netlink API currently does not support it. Until support has been added, expire the route from userspace.
Diffstat (limited to 'src/network/networkd-route.h')
-rw-r--r--src/network/networkd-route.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h
index 785bd1663a..d0a51838ed 100644
--- a/src/network/networkd-route.h
+++ b/src/network/networkd-route.h
@@ -46,6 +46,9 @@ struct Route {
union in_addr_union src;
union in_addr_union prefsrc;
+ usec_t lifetime;
+ sd_event_source *expire;
+
LIST_FIELDS(Route, routes);
};
@@ -61,6 +64,8 @@ int route_add_foreign(Link *link, int family, union in_addr_union *dst, unsigned
int route_update(Route *route, union in_addr_union *src, unsigned char src_prefixlen, union in_addr_union *gw, union in_addr_union *prefsrc, unsigned char scope, unsigned char protocol);
void route_drop(Route *route);
+int route_expire_handler(sd_event_source *s, uint64_t usec, void *userdata);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free);
#define _cleanup_route_free_ _cleanup_(route_freep)