Add exceed merge path on limit
Saklak, Marcin
msaklak at akamai.com
Fri Mar 7 14:53:37 CET 2025
Hi All,
I’m wondering if it’s possible to add a log entry whenever the merged path limit is exceeded.
For example, a route can have 64 next hops, but BIRD export to the kernel up to merge limit and skip rest of next hops.
I’d like to be able to detect when this happens.
Below is a potential solution for that:
---
nest/rt-attr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index c8ef8e08..ef118cb0 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -323,6 +323,8 @@ nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, lin
n = &((*n)->next);
}
*n = NULL;
+ if (max == -1)
+ log(L_ERR "Exceeded merge paths on limit!");
return root;
}
--
2.34.1
If you have any suggestions or a better approach, please let me know!
Best regards,
Marcin Sakłak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20250307/db1bf63a/attachment.htm>
More information about the Bird-users
mailing list