Add exceed merge path on limit
Maria Matejka
maria.matejka at nic.cz
Fri Mar 7 15:25:55 CET 2025
Hello Marcin,
this looks interesting, would you please elaborate on the intended usecase? Is that something like "the hardware goes crazy with too many next hops"?
I'm wondering whether this is a direct intended use, or some crazy workaround which could be done completely differently if BIRD had the right tooling for your use case.
Thanks,
Maria
On March 7, 2025 2:53:37 PM GMT+01:00, "Saklak, Marcin via Bird-users" <bird-users at network.cz> wrote:
>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
--
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20250307/bf145c83/attachment.htm>
More information about the Bird-users
mailing list