From 7144c9ca46f092da33a4e051bbce8f973a3bd8c4 Mon Sep 17 00:00:00 2001 From: Radu Carpa Date: Tue, 17 Jan 2023 18:13:37 +0100 Subject: Filter: Allow setting the 'onlink' route attribute in filters Add static route attribute to set onlink flag for route next hop. Can be used to build a dynamically routed IP-in-IP overlay network. Usage: ifname = "tunl0"; onlink = true; gw = bgp_next_hop; --- filter/config.Y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'filter/config.Y') diff --git a/filter/config.Y b/filter/config.Y index 1d9d9aa9..a1e5e9f1 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -305,7 +305,7 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN, IF, THEN, ELSE, CASE, FOR, IN, DO, TRUE, FALSE, RT, RO, UNKNOWN, GENERIC, - FROM, GW, NET, MASK, PROTO, SOURCE, SCOPE, DEST, IFNAME, IFINDEX, WEIGHT, GW_MPLS, + FROM, GW, NET, MASK, PROTO, SOURCE, SCOPE, DEST, IFNAME, IFINDEX, WEIGHT, GW_MPLS, ONLINK, PREFERENCE, ROA_CHECK, ASN, SRC, DST, IS_V4, IS_V6, @@ -795,6 +795,7 @@ static_attr: | WEIGHT { $$ = f_new_static_attr(T_INT, SA_WEIGHT, 0); } | PREFERENCE { $$ = f_new_static_attr(T_INT, SA_PREF, 0); } | GW_MPLS { $$ = f_new_static_attr(T_INT, SA_GW_MPLS, 0); } + | ONLINK { $$ = f_new_static_attr(T_BOOL, SA_ONLINK, 0); } ; term: -- cgit v1.2.3