1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Filter: Implement last_nonaggregated operator on bgp_path

This commit is contained in:
Ondrej Zajicek (work)
2016-02-16 17:33:58 +01:00
parent c2106b674c
commit 9c9cc35c02
5 changed files with 45 additions and 3 deletions

View File

@@ -1091,6 +1091,14 @@ interpret(struct f_inst *what)
res.type = T_INT;
res.val.i = as;
break;
case P('a','L'): /* Get last ASN from non-aggregated part of AS PATH */
ONEARG;
if (v1.type != T_PATH)
runtime( "AS path expected" );
res.type = T_INT;
res.val.i = as_path_get_last_nonaggregated(v1.val.ad);
break;
case 'r':
ONEARG;
res = v1;