diff --git a/conf/confbase.Y b/conf/confbase.Y index aec4aeb4..11393fe2 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -64,6 +64,7 @@ CF_DECLS struct proto_spec ps; struct channel_limit cl; struct timeformat *tf; + u32 *lbl; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT @@ -82,6 +83,7 @@ CF_DECLS %type ipa %type net_ip4_ net_ip6_ net_ip6 net_ip_ net_ip net_or_ipa %type net_ net_any net_roa4_ net_roa6_ net_roa_ +%type label_stack_start label_stack %type text opttext @@ -266,6 +268,22 @@ net_or_ipa: } ; +label_stack_start: NUM +{ + $$ = cfg_allocz(sizeof(u32) * (NEXTHOP_MAX_LABEL_STACK+1)); + $$[0] = 1; + $$[1] = $1; +}; + +label_stack: + label_stack_start + | label_stack '/' NUM { + if ($1[0] >= NEXTHOP_MAX_LABEL_STACK) + cf_error("Too many labels in stack."); + $1[++$1[0]] = $3; + $$ = $1; + } +; datetime: TEXT { diff --git a/doc/bird.sgml b/doc/bird.sgml index 999fa294..23026eae 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -4141,8 +4141,8 @@ specific destination for them and you don't want to send them out through the default route to prevent routing loops).

There are five types of static routes: `classical' routes telling to forward -packets to a neighboring router, multipath routes specifying several (possibly -weighted) neighboring routers, device routes specifying forwarding to hosts on a +packets to a neighboring router (single path or multipath, possibly weighted), +device routes specifying forwarding to hosts on a directly connected network, recursive routes computing their nexthops by doing route table lookups for a given IP, and special routes (sink, blackhole etc.) which specify a special action to be done instead of forwarding the packet. @@ -4174,14 +4174,14 @@ definition of the protocol contains mainly a list of static routes.

Route definitions (each may also contain a block of per-route options): -