summaryrefslogtreecommitdiff
path: root/nest/a-path.c
AgeCommit message (Collapse)Author
2023-09-26Basic route aggregationIgor Putovny
Add a new protocol offering route aggregation. User can specify list of route attributes in the configuration file and run route aggregation on the export side of the pipe protocol. Routes are sorted and for every group of equivalent routes new route is created and exported to the routing table. It is also possible to specify filter which will run for every route before aggregation. Furthermore, it will be possible to set attributes of new routes according to attributes of the aggregated routes. This is a work in progress. Original work by Igor Putovny, subsequent cleanups and finalization by Maria Matejka.
2022-07-11Merge remote-tracking branch 'origin/master' into backportMaria Matejka
2022-06-27Filter: Implement for loopsOndrej Zajicek (work)
For loops allow to iterate over elements in compound data like BGP paths or community lists. The syntax is: for [ <type> ] <variable> in <expr> do <command-body>
2022-06-27Nest: Cleanups in as_path_filter()Ondrej Zajicek (work)
Use struct f_val as a common argument for as_path_filter(), as suggested by Alexander Zubkov. That allows to use NULL sets as valid arguments.
2022-04-06Minor fix: f_val literals should always have named struct fieldsMaria Matejka
2020-05-18Nest: Implement BGP path mask loop operatorOndrej Zajicek (work)
Implement regex-like '+' operator in BGP path masks to match previous path mask item multiple times. This is useful as ASNs may appear multiple times in paths due to path prepending for traffic engineering purposes.
2019-11-04BGP: Add option to reject AS_SETsOndrej Zajicek (work)
There is a pending draft to make them obsolete
2019-08-06Filter: Allow to use set constants / expressions in path masksOndrej Zajicek (work)
Allow to not only use set literals in path masks, but also existing set constants or set expressions.
2019-08-06Filter: Allow to use sets in path masksOndrej Zajicek (work)
2019-07-03Removed obsolete comment at as_path_cut()Maria Matejka
2019-02-20Filter: merged filter instruction constructors, counting line size on ↵Maria Matejka
instruction construct
2019-02-20Filters: split the large filter.h file to smaller files.Maria Matejka
This should be revised, there are still ugly things in the filter API.
2019-02-20Filter refactoring: dropped the recursion from the interpreterMaria Matejka
This is a major change of how the filters are interpreted. If everything works how it should, it should not affect you unless you are hacking the filters themselves. Anyway, this change should make a huge improvement in the filter performance as previous benchmarks showed that our major problem lies in the recursion itself. There are also some changes in nest and protocols, related mostly to spreading const declarations throughout the whole BIRD and also to refactored dynamic attribute definitions. The need of these came up during the whole work and it is too difficult to split out these not-so-related changes.
2018-09-18No more warnings ...Jan Maria Matejka
no more warnings No more warnings over me And while it is being compiled all the log is black and white Release BIRD now and then let it flee (use the melody of well-known Oh Freedom!)
2018-03-14Merge branch 'master' into int-newJan Maria Matejka
2018-03-14Filter: make bgpmask literals real constructorsJan Maria Matejka
The bgpmask literals can include expressions. This is OK but they have to be interpreted as soon as the code is run, not in the time the code is used as value. This led to strange behavior like rewriting bgpmasks when they shan't be rewritten: function mask_generator(int as) { return [= * as * =]; } function another() bgpmask m1; bgpmask m2; { m1 = mask_generator(10); m2 = mask_generator(20); if (m1 == m2) { print("strange"); # this would happen } } Moreover, sending this to CLI would cause stack overflow and knock down the whole BIRD, as soon as there is at least one route to execute the given filter on. show route filter bgpmask mmm; bgppath ppp; { ppp = +empty+; mmm = [= (ppp ~ mmm) =]; print(mmm); accept; } The magic match operator (~) inside the bgpmask literal would try to resolve mmm, which points to the same bgpmask so it would resolve itself, call the magic match operator and vice versa. After this patch, the bgpmask literal will get resolved as soon as it's assigned to mmm and it also will return a type error as bool is not convertible to ASN in BIRD.
2018-02-07Nest: Trivial whitespace cleanupOndrej Zajicek (work)
2017-01-22BGP: Support for AS confederations (RFC 5065)Ondrej Zajicek (work)
2016-12-07BGP redesignOndrej Zajicek (work)
Integrated and extensible BGP with generalized AFI handling, support for IPv4+IPv6 AFI and unicast+multicast SAFI.
2016-11-30nest/a-path.c: Fix description of BS constant (block size)Pavel Tvrdik
2016-11-09 Unit Testing for BIRDOndrej Zajicek (work)
- Unit Testing Framework (BirdTest) - Integration of BirdTest into the BIRD build system - Tests for several BIRD modules Based on squashed Pavel Tvrdik's int-test branch, updated for current int-new branch.
2016-11-01Build: switch on -Wextra, get rid of most of the warningsJan Moskyto Matejka
There are several unresolved -Wmissing-field-initializers on older versions of GCC than 5.1, all of them false positive.
2016-06-08Add AS# ranges to bgpmask.Ondrej Filip
2016-02-16Filter: Implement last_nonaggregated operator on bgp_pathOndrej Zajicek (work)
2015-06-08unsigned [int] -> uintPavel Tvrdík
2013-10-21Implements 'allow local as' option.Ondrej Zajicek
Similar to allowas-in option on other routers.
2013-08-15Extends delete/filter operators to work no bgp_paths.Ondrej Zajicek
2013-07-09Implements 'bgppath ~ int set' filter op.Ondrej Zajicek
2012-04-30Cleanup in sysdep KRT code, part 2.Ondrej Zajicek
Remove support for historic Linux kernels, merge krt-iface, krt-set and krt-scan stub headers.
2010-02-21Fix configure to enable warnings and fix most of them.Ondrej Zajicek
2009-12-14Remove bgp_as4_support variable.Ondrej Zajicek
2009-10-12Rename as_path_get_last/as_path_get_first to be consistent.Ondrej Zajicek
2009-08-27Some cleanups.Ondrej Zajicek
2009-08-25Fixes bug related to AS2->AS4 conversion.Ondrej Zajicek
2009-06-01Adds support for dynamic pair and bgp mask expressions.Ondrej Zajicek
2009-04-17Rewrite of buggy AS path matching.Ondrej Zajicek
Old AS path maching supposes thath AS number appears only once in AS path, but that is not true. It also contains some bugs related to AS path sets. New code does not use any assumptions about semantic structure of AS path. It is asymptotically slower than the old code, but on real paths it is not significant. It also allows '?' for matching one arbitrary AS number.
2009-02-21Fix bug in empty bgp mask handlingOndrej Zajicek
2008-11-16Fix bug in AS path matchingOndrej Zajicek
2008-10-26Bugfixes in MULIT_EXIT_DISC attribute handling.Ondrej Zajicek
- Old MED handling was completely different from behavior specified in RFCs - for example they havn't been propagated to neighboring areas. - Update tie-breaking according to RFC 4271. - Change default value for 'default bgp_med' configuration option according to RFC 4271.
2008-10-26Implementation of 4B ASN support for BGPOndrej Zajicek
2002-11-13Added missing semicolons.Martin Mares
2000-05-19Added as_path_get_first().Martin Mares
2000-05-04Removed a lot of unused variables.Martin Mares
Please try compiling your code with --enable-warnings to see them. (The unused parameter warnings are usually bogus, the unused variable ones are very useful, but gcc is unable to control them separately.)
2000-04-27Fixed stupid bug in as_path_format().Martin Mares
2000-04-26Whitespace changes.Pavel Machek
2000-04-17Aesthetical tweaks (asterisk spells `asterisk' etc.)Martin Mares
2000-04-17as_path_match moved to a-path.cPavel Machek
2000-04-17Path_getlen moved to nest and length was made callable from filters.Pavel Machek
2000-04-17Printing of AS paths and community sets.Martin Mares
2000-04-17Created nest/a-path.c and a-set.c which should contain general operationsMartin Mares
on AS paths and community sets. Moved as_path_prepend() there. Pavel, please move the other functions as well.