summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2018-12-19Doc: Rename code documentation files back to DocOndrej Zajicek (work)
2018-11-05Filter: Make ifname attribute modifiableOndrej Zajicek (work)
Allow to change an interface associated with a route by setting ifname attribute. It will also change the route to a direct one.
2018-04-23Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder ↵Maria Matejka
on case-insensitive filesystems
2018-03-19C99 loop declarations not allowed in 1.6.xOndrej Zajicek (work)
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-03-13Filters: Removed FI_COMMA, not used for 19 years.Jan Maria Matejka
This instruction was removed in the commit linked below and never used ever again. Rest in peace. commit 84c7e1943f0dbf896b1dd8d02a21120aa00463f4 Author: Pavel Machek <pavel@ucw.cz> Date: Tue Mar 2 19:49:28 1999 +0000
2018-03-13Filter: recursion to loopJan Maria Matejka
It was supposed to do tail-recursion in interpret() but it didn't compile as such. Converting it to loop makes a significant filter performance improvement for flat filters.
2018-03-13Filter: Instruction codes named as enumMaria Jan Matejka
The two-letter instructions were quite messy but they could be easily read from memory dumps. Now GDB (since 2012) supports pretty printing enum values and GCC checks the switch construction for missing enum values so we are converting the nice two-byte values to enums. Anyway, the enum still keeps the old two-byte values to be able to read the instruction codes even without GDB from plain memory dump.
2018-01-16Filter: Allow silent filter executionOndrej Zajicek (work)
A filter should log messages only if executed explicitly (e.g., during route export or route import). When a filter is executed for technical reasons (e.g., to establish whether a route was exported before), it should run silently.
2017-11-09Filter test: typo fixJan Maria Matejka
2017-10-04RAdv: Support for more specific routes (RFC 4191)Michal 'vorner' Vaner
The patch implements Default Router Preferences and More-Specific Routes (RFC 4191) for RAdv protocol, allowing to announce router preference and more specific routes in router advertisements. Routes can be exported to RAdv like to regular routing protocols. Some cleanups, bugfixes and other changes done by Ondrej Zajicek.
2017-09-20filter: Allow assigning enums into extended attributesMichal 'vorner' Vaner
They are internally ints, but they got refused as a wrong type. This fixes setting of the BGP origin and is also needed for RA.
2017-06-19Filters: Do not clamp EC set values to 16 bit for EC_GENERICsOndrej Zajicek (work)
Thanks to Lennert Buytenhek <buytenh@wantstofly.org> for the patch.
2017-01-24Filter: Fix missing case for !~ operatorOndrej Zajicek (work)
Thanks to Vincent Bernat for the patch.
2016-11-08Minor code cleanupsOndrej Zajicek (work)
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-10-18Filter: Minor formatting changes in test.confOndrej Zajicek (work)
2016-10-13Filter: Expand testing of large community setsPavel Tvrdik
2016-10-11Tree/Trie: Check the end of bufferPavel Tvrdik
We set buffer->pos to buffer->end in function buffer_print() when bvsnprintf() failed, so there would be uninitialized memory between the old buffer->pos and the current buffer->pos.
2016-10-04Filter: fix missing separatorOndrej Zajicek (work)
2016-10-03Filter: large community setsOndrej Zajicek (work)
Add support for lc sets to filter code. Grammar of (small) community sets has to be updated to avoid parser collisions.
2016-10-03BGP: Support for large communitiesOndrej Zajicek (work)
Add support for large communities (draft-ietf-idr-large-community), 96bit alternative to RFC 1997 communities. Thanks to Matt Griswold for the original patch.
2016-09-21Add !~ operator to filter grammarPavel Tvrdik
2016-09-15Filter: Prefer xmalloc/xfree to malloc/freePavel Tvrdik
2016-08-16whitespace fixesOndřej Surý
2016-07-01Filter: Fixes reconfiguration with last_nonaggregated operatorOndrej Zajicek (work)
2016-06-09Filters: Fixes pm_same() w.r.t. ASN ranges and ASN expressionsOndrej Zajicek (work)
This is necessary for proper detection of filter changes during reconfigurations.
2016-06-08Add AS# ranges to bgpmask.Ondrej Filip
2016-02-16Filter: Implement last_nonaggregated operator on bgp_pathOndrej Zajicek (work)
2015-07-20Static: Allows to specify attributes for static routesOndrej Zajicek
The patch adds suport for specifying route attributes together with static routes, e.g.: route 10.1.1.0/24 via 10.0.0.1 { krt_advmss = 1200; ospf_metric1 = 100; };
2015-06-08BGP multipath supportOndrej Zajicek
Kernel option 'merge paths' allows to merge routes exported to kernel protocol (currently BGP and static routes) to multipath routes.
2015-05-10Add bitfield route attribute typeOndrej Zajicek
2015-02-21Remove a comparison of unsigned expression < 0Pavel Tvrdik
2015-02-21Allows user data attached to f_trie_node structure.Ondrej Zajicek
Thanks to Alexander Chernikov for the patch.
2014-10-02Implements token bucket filter for rate limiting.Ondrej Zajicek
2014-10-02Allows more constants in set literals.Ondrej Zajicek
Thanks to Michael Fincham for the bugreport.
2014-07-07Replaces function name in test.conf as it collided with new keyword.Ondrej Zajicek
2013-11-25Merge branch 'master' into add-pathOndrej Zajicek
2013-11-24Converts filters to unsigned integers.Ondrej Zajicek
2013-11-23Merge branch 'master' into add-pathOndrej Zajicek
Conflicts: filter/filter.c nest/proto.c nest/rt-table.c proto/bgp/bgp.h proto/bgp/config.Y
2013-11-22Minor fix in log_commit() w.r.t. changes in BFD branch.Ondrej Zajicek
2013-11-22Merge commit 'origin/bfd'Ondrej Zajicek
2013-11-20Additional filter test case.Ondrej Zajicek
2013-10-21Implements 'allow local as' option.Ondrej Zajicek
Similar to allowas-in option on other routers.
2013-10-05Fixes some BFD bugs and makes logging thread-safe.Ondrej Zajicek
2013-10-02Implements C.len operator for clist and eclist types.Ondrej Zajicek
Thanks to Sergey Popovich for the original patch.
2013-10-02Some fixes in filter code.Ondrej Zajicek
Thanks to Sergey Popovich for original patches.
2013-10-02Minor code cleanups.Ondrej Zajicek
Thanks to Sergey Popovich for the patch.
2013-10-02Simplifies val_in_range().Ondrej Zajicek
Also fixes missing type check for element ~ set.
2013-09-26Rewrites static attribute filter code and adds ifname/ifindex attributes.Ondrej Zajicek
Thanks to Sergey Popovich for the original ifname/ifindex patch.