diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-02-16 17:33:58 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-02-16 17:33:58 +0100 |
commit | 9c9cc35c0273f8bcae10fb8b546d199514b2bbc5 (patch) | |
tree | 060b7ebe4012294ee4468a47cb4e73e3f6b1f0c1 /filter/filter.c | |
parent | c2106b674ca632f7c0bffd7cab4b1940f74d353c (diff) |
Filter: Implement last_nonaggregated operator on bgp_path
Diffstat (limited to 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index 55062aca..eddf4228 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -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; |