summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2019-02-23Lua: WIP tunnel encapMikael Magnusson
2019-02-22Lua: Allow evaluation in globalsMikael Magnusson
2019-02-22Lua: Adapt to changes in int-new branchMikael Magnusson
2019-02-22lua filter saving and reusingJan Maria Matejka
2019-02-22Lua filtering able to reject and acceptJan Maria Matejka
2019-02-22Lua filters: connected with no exported varsJan Moskyto Matejka
2018-12-14Doc: Rename code documentation files back to DocOndrej Zajicek (work)
2018-12-06Custom route attributesMaria Matejka
For local route marking purposes, local custom route attributes may be defined. These attributes are seamlessly stripped after export filter to every real protocol like Kernel, BGP or OSPF, they however pass through pipes. We currently allow at most 256 custom attributes. This should be much faster than currently used bgp communities for marking routes.
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-10-25Filter: Add support for VPN_RD setsOndrej Zajicek (work)
2018-10-25Filter: Fix minor bug in accessing bgp_pathOndrej Zajicek (work)
Not relevant for regular BGP paths, just for BGP paths added by filters to e.g. static routes.
2018-06-27Nest: Neighbor cache cleanupsOndrej Zajicek (work)
Simplify neighbor cache code, fix several minor bugs, and improve handling of ONLINK flag.
2018-06-26Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder ↵Maria Matejka
on case-insensitive filesystems
2018-06-26Config: Dropping CF_ADDTO.Jan Maria Matejka
2018-06-19Filter: fixed eattr cached pointerJan Maria Matejka
Use ACCESS_RTE to guard **f_rte, use ACCESS_EATTRS to guard **f_eattrs. Use f_rta_cow() before writing to rta or eattrs, use f_rte_cow() before writing preference (stored in rte). Do not access eattrs indirectly through (*f_rte)->attrs->eattrs, it is way too slow. The cached pointer is faster.
2018-05-30Nest: Removing separate tmpa from route propagationJan Maria Matejka
This is a fundamental change of an original (1999) concept of route processing inside BIRD. During import/export, there was a temporary ea_list created which was to be used instead of the another one inside the route itself. This led to some confusion, quirks, and strange filter code that handled extended route attributes. Dropping it now. The protocol interface has changed in an uniform way -- the `struct ea_list *attrs` argument has been removed from store_tmp_attrs(), import_control(), rt_notify() and get_route_info().
2018-05-29Protocol: Introducing an enum protocol_classJan Maria Matejka
This supersedes the EAP_* constants.
2018-05-29Filter: macro for recursive interpretation of instructionsJan Maria Matejka
2018-05-29Filter: Simple type checks converted to ARG() macroJan Maria Matejka
2018-05-29Filter: Removing the third argument hackJan Maria Matejka
Just to make the code a bit more clean and easier to maintain.
2018-05-29Filter: instruction namesJan Maria Matejka
2018-05-29Filter: Instruction codes linearizedJan Maria Matejka
2018-05-16Filter: Add support for src filter op to access SADR source prefixOndrej Zajicek (work)
The patch allows to use 'net.src' to access SADR source prefix from filters. Thanks to Toke Hoiland-Jorgensen for the original patch for srclen.
2018-04-27Filter: Added missing instruction comparators.Jan Maria Matejka
These instructions caused SIGABORTs on reconfiguration.
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-03-13Merge branch 'master' into int-newJan Maria Matejka
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-13Merge branch 'master' into int-newJan Maria Matejka
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-03-08Filter: the test conf checks also a bit of BGP argsJan Maria Matejka
Uncommented an old test.
2018-03-08Config: Dropped the ipv4:netmask4 syntax for IPv4 prefixes.Jan Maria Matejka
2018-02-13Handle properly enums for extended attributesOndrej Zajicek (work)
2018-01-23Merge branch 'master' into int-newOndrej Zajicek (work)
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.
2018-01-16BGP: Require explicit import and export policies for EBGP channelsOndrej Zajicek (work)
To comply with RFC 8212 requirements.
2018-01-03Filter: Handle undefined BGP paths as emptyOndrej Zajicek (work)
The same is already done for clists. Also fixes defined() to work properly for paths and clists.
2017-12-08Filter: Remove old BGP path mask syntax from testsOndrej Zajicek (work)
2017-12-08Docs: Update to v2.0Jan Maria Matejka
2017-12-07Merge commit '1e8721e2aeccfbc3f533e8b8abc07582cee77e9a' into int-newOndrej Zajicek (work)
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-08-09Merge branch 'master' into int-newOndrej Zajicek (work)
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-05-23Change parser to handle numbers as unsignedOndrej Zajicek (work)
Lexer always parsed numbers as unsigned, but parser handled them as signed and grammar contained many unnecessary checks for negativity.
2017-05-16Linpool: default allocation sizeJan Moskyto Matejka
2017-04-26Test: Fix broken test for filtersOndrej Zajicek (work)
2017-04-26Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-newJan Moskyto Matejka