summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/radv-internal.h
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2018-01-04 15:11:55 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2018-01-04 15:22:44 +0200
commitd601b566876e227abee18165e1a85673ac3ed41a (patch)
tree608fdf21f27f954696f365e0a6509824835549e3 /src/libsystemd-network/radv-internal.h
parent652bf042549bb24ccb3d24c32701b614f4720e4f (diff)
downloadsystemd-d601b566876e227abee18165e1a85673ac3ed41a.tar.gz
radv: Add prefixes with dynamically updated lifetimes
Add a boolean that indicates whether the prefixes will always exist or if they will time out after the assigned valid lifetime. In the latter case calculate the expiry times for both preferred and valid lifetimes for the prefixes, and decrease the remaining lifetimes each time when a Router Advertisement is sent. Should the prefix be updated, re-calculate the prefix lifetime. When updating, update the existing entry, if any, with the lifetimes of the added entry as the existing entry has its lifetimes set according to its previously calculated expiry times.
Diffstat (limited to 'src/libsystemd-network/radv-internal.h')
-rw-r--r--src/libsystemd-network/radv-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-network/radv-internal.h b/src/libsystemd-network/radv-internal.h
index 441939b717..837e7f2603 100644
--- a/src/libsystemd-network/radv-internal.h
+++ b/src/libsystemd-network/radv-internal.h
@@ -93,6 +93,9 @@ struct sd_radv_prefix {
} _packed_ opt;
LIST_FIELDS(struct sd_radv_prefix, prefix);
+
+ usec_t valid_until;
+ usec_t preferred_until;
};
#define log_radv_full(level, error, fmt, ...) log_internal(level, error, __FILE__, __LINE__, __func__, "RADV: " fmt, ##__VA_ARGS__)