]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Fix bug in export table
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 24 Sep 2019 15:12:15 +0000 (17:12 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 24 Sep 2019 15:17:37 +0000 (17:17 +0200)
Exported route may be in modified state, we need to get cached one for
rte_same() and rta_clone() to work properly.

nest/rt-table.c

index 318ec2eeee5bcac3e5643cfec577957e85e617d2..c3ec0314760c2c6ca0a73c0c827f26a09984eb71 100644 (file)
@@ -2705,6 +2705,11 @@ rte_update_out(struct channel *c, const net_addr *n, rte *new, rte *old0, int re
   {
     net = net_get(tab, n);
     src = new->attrs->src;
+
+    rte_store_tmp_attrs(new, rte_update_pool, NULL);
+
+    if (!rta_is_cached(new->attrs))
+      new->attrs = rta_lookup(new->attrs);
   }
   else
   {