Filter: Add route attribute gw_mpls_stack

Add route attribute gw_mpls_stack to make MPLS stack of route nexthop
accessible from filters. Its type is T_CLIST, which is really not correct
(as it is a list, while T_CLIST is a set). Therefore, we keep this
attribute *undocumented* and it will be *changed* without further notice.

Based on a patch from Trisha Biswas <tbiswas@fastly.com>, thanks!
This commit is contained in:
Ondrej Zajicek
2024-03-05 16:38:24 +01:00
parent 26dd61ee7f
commit 114be2af28
5 changed files with 61 additions and 2 deletions
+1
View File
@@ -392,6 +392,7 @@ static inline ip6_addr ip6_ntoh(ip6_addr a)
#define MPLS_MAX_LABEL 0x100000
#define MPLS_MAX_LABEL_STACK 8
#define MPLS_MAX_LABEL_STRING MPLS_MAX_LABEL_STACK*12 + 5
typedef struct mpls_label_stack {
uint len;
u32 stack[MPLS_MAX_LABEL_STACK];