[LEDE-DEV] [PATCH netifd 2/2] interface-ip: set prefix indicator flag when IPv6 prefix lifetime changes

Hans Dedecker dedeckeh at gmail.com
Thu Mar 9 08:33:00 PST 2017


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 at gmail.com>
---
 interface-ip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/interface-ip.c b/interface-ip.c
index 366f69a..9bf4234 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -1049,6 +1049,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);
-- 
1.9.1




More information about the Lede-dev mailing list