Commit graph

105 commits

Author SHA1 Message Date
Ondrej Zajicek 5004d02cb9 Merge branch 'master' into dev 2009-06-26 01:06:12 +02:00
Ondrej Zajicek 92a72a4cbd Adds support for dynamic pair and bgp mask expressions. 2009-06-01 19:32:41 +02:00
Ondrej Zajicek f429d43482 Removes some remnant of '|' bgp path separator. 2009-06-01 16:20:48 +02:00
Ondrej Filip 9be1086d29 New type variable 'V' defined in filters. This type is checked
only for name, never for value in function filter_same()
2009-05-29 23:08:28 +02:00
Ondrej Zajicek c8a6b9a3d1 Rewrite of buggy AS path matching.
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-04-17 01:48:36 +02:00
Ondrej Zajicek b1a597e0c3 Reimplementation of prefix sets.
Prefix sets were broken beyond any repair and have to be reimplemented.
They are reimplemented using a trie with bitmasks in nodes.
There is also change in the interpretation of minus prefix pattern,
but the old interpretation was already inconsistent with
the documentation and broken.

There is also some bugfixes in filter code related to set variables.
2009-03-31 12:55:57 +02:00
Ondrej Zajicek cf18603491 New syntax for bgp_path 2009-03-14 12:43:10 +01:00
Ondrej Zajicek f949163039 New syntax for bgp_path 2009-01-27 17:35:00 +01:00
Ondrej Zajicek 083c43e22e fixes some 64-bit related bugs.
Filter code used 'aux' integer field of 'symbol' struct to store ptr
to next symbol and both 'aux2' and 'def' fields for value.
Changed to just 'def' for value and 'aux2' for ptr to next symbol.
Also another minor bugfix.
2008-12-25 11:55:27 +01:00
Ondrej Zajicek e29fa06ece New read-only route attribute 'proto' added. It returns a string
representing a name of the protocol that originated the route.
Strings can be compared using = or matched using ~. Routes can
be filtered, for example:

show route where proto ~ "bgp1*"
2008-11-14 14:50:37 +01:00
Ondrej Zajicek 11cb620266 Implementation of 4B ASN support for BGP 2008-10-26 22:36:08 +01:00
Martin Mares 03e3d184b2 Fix bison input for current build tools, otherwise bison or the compiler
will abort the build.

(by Andreas)
2004-05-31 17:44:39 +00:00
Martin Mares de10a974f2 Added missing semicolons. 2002-11-13 08:46:12 +00:00
Pavel Machek a5a947d4d8 Fixing error messages. 2000-06-08 10:26:19 +00:00
Martin Mares bf3eb98eb8 Use nested scopes properly. Updated according to cf_define_symbol() changes.
The rest of code doesn't need changing since it doesn't use nesting.
2000-06-04 19:30:55 +00:00
Pavel Machek 5f4aee76a2 Added && and ||. 2000-06-01 08:43:29 +00:00
Pavel Machek 1877dab217 Allow
case net {
                       62.0.0.0/8+:
                       10.0.0.0/8+:
                       else: reject;
               }
2000-06-01 08:34:30 +00:00
Pavel Machek 1895e81e05 Allow matching on enums:
if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
                print "Failed in test";
                quitbird;
        }
2000-06-01 08:32:49 +00:00
Pavel Machek 0dc4431cde Access to all attributes we should be able to access seems to work. 2000-05-30 11:07:22 +00:00
Pavel Machek 26c09e1d25 Added read-only access to all required fields in rta. 2000-05-30 10:42:39 +00:00
Pavel Machek 2bdb5e0083 Cleaning static attributes 2000-05-30 10:23:04 +00:00
Pavel Machek fe613ecded Access to few more attributes is needed. 2000-05-30 10:13:32 +00:00
Pavel Machek ad9074e9ba Cleaned up warnings. 2000-05-25 15:20:40 +00:00
Pavel Machek 9a09a64bb4 Use ? in path matching to avoid /* trap. 2000-05-25 14:58:38 +00:00
Pavel Machek 72282e2a1b Fixed comment not to be misleading. 2000-05-25 12:33:15 +00:00
Pavel Machek 60de3356ab Resolved shift/reduce conflict 2000-05-16 14:24:33 +00:00
Pavel Machek c5a06f65ee Allow other operations than +. 2000-05-15 12:27:45 +00:00
Pavel Machek cbfd671f11 Allow accessing defined symbols. 2000-05-15 12:19:26 +00:00
Martin Mares e3f2d5fce3 Cleanup of configuration.
o  Use `expr' instead of `NUM' and `ipa' instead of `IPA',
   so that defined symbols work everywhere.
o  `define' now accepts both numbers and IP addresses.
o  Renamed `ipa' in filters to `fipa'.

Pavel, please update filters to accept define'd symbols as well.
2000-05-15 11:48:23 +00:00
Martin Mares 3b1c523d79 Got rid of startup functions and filters_postconfig().
By the way, how do you expect pointers to fit in an int?
2000-05-15 10:53:56 +00:00
Martin Mares 1c20608e02 Added f_eval_int() and EVAL configuration command. 2000-05-15 10:49:38 +00:00
Martin Mares 758458be05 Unified parsing of prefixes.
Had to rename `prefix' in filters to `fprefix'.
2000-05-13 11:17:49 +00:00
Martin Mares 2edb31b097 Split CF_HDR section to CF_HDR (only includes) and CF_DEFINES (defines,
C declarations etc.).
2000-04-28 15:11:10 +00:00
Pavel Machek b0c9c21c29 Small cleanup. 2000-04-26 09:38:07 +00:00
Pavel Machek f71bded6e9 Bugfix in i_same (comparing of paths still does not work). 2000-04-26 09:30:12 +00:00
Pavel Machek 7a86a8b08d Added code for testing filters. 2000-04-26 08:03:50 +00:00
Pavel Machek 94d9dfa47a Startup renamed to __startup: it is internal function and mj already
uses word startup in other context.
2000-04-26 07:31:45 +00:00
Pavel Machek 7d6eebae3b Create syntax sugar for add/delete/prepend, so xyzzy.prepend(123) is
possible. That means that milestone 3 was reached.
2000-04-20 10:25:51 +00:00
Pavel Machek 4444ed2b26 It is good idea to separate entries in list _somehow_. Adding/deleting
to community lists from filters now works.
2000-04-17 11:42:08 +00:00
Pavel Machek 9c400ec9dd Int sets moved to core. It is now possible to have variable of type clist. 2000-04-17 11:34:38 +00:00
Pavel Machek 684c6f5a0e Path_getlen moved to nest and length was made callable from filters. 2000-04-17 11:06:39 +00:00
Pavel Machek 4b641bab52 Path matching now actually works, including / * 1 2 3 * /. 2000-04-17 10:50:03 +00:00
Pavel Machek e399b6f6ad Path and path matching seem to work, now. 2000-04-17 10:42:28 +00:00
Pavel Machek afc54517db Prepend and creation of empty path should work, but it has strange
syntax for now.
2000-04-17 10:16:47 +00:00
Pavel Machek a2d157463a One less shift/reduce conflict. 2000-04-12 14:05:37 +00:00
Pavel Machek 10a5360886 Filters now know type path. It is possible to declare variable of type
path, but it is not possible to write constant of type path.

It should be possible to print paths and match them.
2000-04-12 13:31:39 +00:00
Pavel Machek dcab789047 Renamed f_path to f_path_mask -- which is what it really is. Use
linklist instead of array of signed integers for path mask.
2000-04-12 13:07:53 +00:00
Pavel Machek 77de68825c BGP_PATH masks now actually work as data type. 2000-04-12 12:10:37 +00:00
Pavel Machek 7f77e25002 Functions for matching paths added, tested lightly.
Functions for working with community lists added, they compile.

This should not be definitive place for this stuff.
2000-04-10 15:07:43 +00:00
Martin Mares b157361533 SOURCE should really refer to rta->source, not rta->gw.
Please check that all rta attributes are available, I guess that at
least rta->dest is missing.
2000-04-01 09:15:10 +00:00