summaryrefslogtreecommitdiff
path: root/proto/pipe/pipe.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-06-04 18:56:05 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-07-17 13:16:18 +0200
commit68197386ddba616c9973d3190c42f6121a25d9b7 (patch)
treef328462a31a041a8c87f11c76e06503a515943c5 /proto/pipe/pipe.c
parent470efcb98cb33de2d5636679eb0f72c88280d6b8 (diff)
BGP: Long-lived graceful restart
The patch implements long-lived graceful restart for BGP, namely draft-uttaro-idr-bgp-persistence-03.
Diffstat (limited to 'proto/pipe/pipe.c')
-rw-r--r--proto/pipe/pipe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index 5d0e3c76..164191dd 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -89,6 +89,12 @@ pipe_rt_notify(struct proto *P, rtable *src_table, net *n, rte *new, rte *old, e
memcpy(&(e->u), &(new->u), sizeof(e->u));
e->pref = new->pref;
e->pflags = new->pflags;
+
+#ifdef CONFIG_BGP
+ /* Hack to cleanup cached value */
+ if (e->attrs->src->proto->proto == &proto_bgp)
+ e->u.bgp.stale = -1;
+#endif
}
src = a.src;