]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Fix printing of hostentry table
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 27 Mar 2024 22:16:51 +0000 (23:16 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 27 Mar 2024 22:16:51 +0000 (23:16 +0100)
When hostentry is printed, it should show the table in which the nexthop
is resolved, not the dependend one.

nest/rt-attr.c

index 546c67dba0bb774c75b0d92bee186fbc5f843497..0a74cd3de551fc996246408e4452ae6bca771427 100644 (file)
@@ -1376,9 +1376,9 @@ ea_show_hostentry(const struct adata *ad, byte *buf, uint size)
   uint s = 0;
 
   if (ipa_nonzero(had->he->link) && !ipa_equal(had->he->link, had->he->addr))
-    s = bsnprintf(buf, size, "via %I %I table %s", had->he->addr, had->he->link, had->he->tab->name);
+    s = bsnprintf(buf, size, "via %I %I table %s", had->he->addr, had->he->link, had->he->owner->name);
   else
-    s = bsnprintf(buf, size, "via %I table %s", had->he->addr, had->he->tab->name);
+    s = bsnprintf(buf, size, "via %I table %s", had->he->addr, had->he->owner->name);
 
   uint lc = HOSTENTRY_LABEL_COUNT(had);
   if (!lc)