summaryrefslogtreecommitdiffhomepage
path: root/interface-ip.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-03-09 17:33:00 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-03-21 22:47:00 +0100
commita03216660797173fbe67866f75564e3fec9c1e8d (patch)
tree14457fc38e5ea74789df13c1b6208ac944acf2cd /interface-ip.c
parentb4f89847883de95126ef332aa8df886c64b16b3d (diff)
interface-ip: set prefix indicator flag when IPv6 prefix lifetime changes
Trigger interface update event when IPv6 prefix lifetime changes by setting the prefix indicator flag to inform external subsystems (eg hnetd) about IPv6 prefix lifetime changes. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/interface-ip.c b/interface-ip.c
index ddca5d2..dd4e01c 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -1047,6 +1047,10 @@ interface_update_prefix(struct vlist_tree *tree,
list_for_each_entry(c, &prefix_new->assignments, head)
if ((iface = vlist_find(&interfaces, c->name, iface, node)))
interface_set_prefix_address(c, prefix_new, iface, true);
+
+ if (prefix_new->preferred_until != prefix_old->preferred_until ||
+ prefix_new->valid_until != prefix_old->valid_until)
+ ip->iface->updated |= IUF_PREFIX;
} else if (node_new) {
// Set null-route to avoid routing loops
system_add_route(NULL, &route);