Ondrej Zajicek
6285793f18
Replaces function name in test.conf as it collided with new keyword.
2014-07-07 22:23:37 +02:00
Ondrej Zajicek
283c7dfada
Merge branch 'master' into add-path
2013-11-25 18:42:47 +01:00
Ondrej Zajicek
52e030e146
Converts filters to unsigned integers.
2013-11-24 00:17:02 +01:00
Ondrej Zajicek
736e143fa5
Merge branch 'master' into add-path
...
Conflicts:
filter/filter.c
nest/proto.c
nest/rt-table.c
proto/bgp/bgp.h
proto/bgp/config.Y
2013-11-23 11:50:34 +01:00
Ondrej Zajicek
56027b5cbd
Minor fix in log_commit() w.r.t. changes in BFD branch.
2013-11-22 21:58:43 +01:00
Ondrej Zajicek
0aeac9cb7f
Merge commit 'origin/bfd'
2013-11-22 02:48:44 +01:00
Ondrej Zajicek
f8f2419d4c
Additional filter test case.
2013-11-20 13:30:11 +01:00
Ondrej Zajicek
a15dab76f9
Implements 'allow local as' option.
...
Similar to allowas-in option on other routers.
2013-10-21 14:59:35 +02:00
Ondrej Zajicek
0e175f9f0f
Fixes some BFD bugs and makes logging thread-safe.
2013-10-05 20:12:28 +02:00
Ondrej Zajicek
7ccb36d330
Implements C.len operator for clist and eclist types.
...
Thanks to Sergey Popovich for the original patch.
2013-10-02 14:57:29 +02:00
Ondrej Zajicek
28a10f84cb
Some fixes in filter code.
...
Thanks to Sergey Popovich for original patches.
2013-10-02 14:41:37 +02:00
Ondrej Zajicek
70c5780535
Minor code cleanups.
...
Thanks to Sergey Popovich for the patch.
2013-10-02 12:10:09 +02:00
Ondrej Zajicek
b655596d1d
Simplifies val_in_range().
...
Also fixes missing type check for element ~ set.
2013-10-02 11:42:46 +02:00
Ondrej Zajicek
a5fc59587f
Rewrites static attribute filter code and adds ifname/ifindex attributes.
...
Thanks to Sergey Popovich for the original ifname/ifindex patch.
2013-09-26 22:08:21 +02:00
Ondrej Zajicek
507e182a60
Fixes reconfiguration of global set variables.
...
When global set variables were used, every reconfiguration restarted
protocols that use it in filters.
Thanks to Sergey Popovich for a bugreport.
2013-09-10 12:58:24 +02:00
Ondrej Zajicek
bff9ce5130
Extends delete/filter operators to work no bgp_paths.
2013-08-15 01:06:47 +02:00
Ondrej Zajicek
00192d5ab8
Implements proper setting of 'gw' route attribute.
...
Thanks to Sergey Popovich for the bugreport.
2013-08-13 20:32:02 +02:00
Ondrej Zajicek
4ee39ff2ff
Fixes initial random values for function arguments.
...
Thanks to Javor Kliachev for the bugreport.
2013-07-26 11:08:59 +02:00
Ondrej Zajicek
1103b32e83
Allows to define constants of all filter types.
2013-07-25 22:33:57 +02:00
Ondrej Zajicek
508d936078
Implements eval command and minor CLI cleanups.
...
Implemented eval command can be used to evaluate expressions.
The patch also documents echo command and allows to use log classes
instead of integer as a mask for echo.
2013-07-25 13:15:32 +02:00
Ondrej Zajicek
cc31b75a8f
Implements 'bgppath ~ int set' filter op.
2013-07-09 23:27:10 +02:00
Ondrej Zajicek
36da2857bc
Implements router advertisements activated by received routes.
...
The RAdv protocol could be configured to change its behavior based on
availability of routes, e.g., do not announce router lifetime when a
default route is not available.
2013-02-08 23:58:27 +01:00
Ondrej Zajicek
b31774eeb0
Removes some nonsense.
2012-11-27 01:30:09 +01:00
Ondrej Zajicek
3e40f3e795
Fixes setting of route attributes of type router id.
2012-11-27 01:25:47 +01:00
Ondrej Zajicek
094d2bdb79
Implements ADD-PATH extension for BGP.
...
Allows to send and receive multiple routes for one network by one BGP
session. Also contains necessary core changes to support this (routing
tables accepting several routes for one network from one protocol).
It needs some more cleanup before merging to the master branch.
2012-08-14 16:46:43 +02:00
Ondrej Zajicek
4be266a983
Implements wildcard matching in config file include.
...
Also fixes some minor bugs in include.
Thanks Kelly Cochran for suggestion and draft patch.
2012-07-18 19:29:33 +02:00
Ondrej Zajicek
182a78957d
Allows some modifications of dest attribute in filters.
2012-04-29 01:35:52 +02:00
Ondrej Zajicek
af582c4811
Route Origin Authorization basics.
...
- ROA tables, which are used as a basic part for RPKI.
- Commands for examining and modifying ROA tables.
- Filter operators based on ROA tables consistent with RFC 6483.
2012-03-18 17:32:30 +01:00
Ondrej Zajicek
0888a737b0
Extends set operations in filters.
...
Allows add/filter/delete clist on clist (set algebra on clists).
Allows number ~ bgppath match.
2012-03-15 21:07:58 +01:00
Ondrej Zajicek
8796a8a56e
Fixes name for unnamed filters.
...
Thanks to Alexander V. Chernikov for the suggestion.
2012-03-15 12:50:49 +01:00
Ondrej Zajicek
117e3c4bbf
Fixes a bug in pair set intervals.
...
Pair intervals in form (a,b)..(c,d) were mishanded.
Thanks to Alexander Shikoff for the bugreport.
2012-03-15 12:18:26 +01:00
Ondrej Zajicek
a03ede6493
Fixes a tricky bug in route filtering.
...
Route attributes was used after rta was freed during copy-on-write in
filter code. This causes some random crashes, esp. with multipath
routes.
2012-01-03 00:42:25 +01:00
Ondrej Zajicek
78e33c29bb
Some minor fixes in parser.
2011-10-26 20:06:36 +02:00
Ondrej Zajicek
736fd7303c
Fixes a bug with multiple function arguments.
2011-09-27 13:49:32 +02:00
Ondrej Filip
4271f2b77e
Fixed problem during 'configure' with EC
2011-09-18 13:52:50 +02:00
Ondrej Filip
48ec367aab
Configuration can include other files.
2011-09-11 21:21:47 +02:00
Ondrej Zajicek
42a0c05408
BGP Extended communities.
2011-08-14 13:55:02 +02:00
Ondrej Zajicek
fdf16eb658
Prints full community lists during 'show route all'.
2011-07-03 19:43:30 +02:00
Ondrej Zajicek
e08d2ff08e
Adds filter clist operation.
2011-06-26 17:09:24 +02:00
Ondrej Zajicek
b8cc390e7e
Fixes several problems in filter syntax.
...
- Fixes several conflicts in the grammar.
- Fixes a bug in (a..b, c) pair patterns.
- Makes pair patterns orthogonal.
- Allows term expressions in pair patterns without additional ( ).
- Allows several comma separated values in switch cases.
2011-05-06 22:00:54 +02:00
Ondrej Filip
c454872f4e
Avoid using stack.
2011-03-27 23:27:37 +02:00
Ondrej Filip
4fc36f394e
This adds (*,x) functionality.
2011-03-26 14:18:56 +01:00
Ondrej Zajicek
0aa88530ad
Convert && and || to shortcut boolean operators.
2011-03-23 13:40:46 +01:00
Ondrej Zajicek
26d92bb892
A hack to distinguish if..else from else: in case.
...
The old BIRD grammar needs two lookaheads to distinguish if..else from
else: in case, which caused the parser to fail on some combinations of
both expressions.
This patch replaces two tokens 'else' ':' by one token 'else:' to fix
that.
2011-03-23 12:49:53 +01:00
Ondrej Zajicek
938b191b92
Fixes error handling in ASN expressions.
2010-10-09 01:00:53 +02:00
Ondrej Zajicek
b2b7bbfc69
Fixes scope of filter symbols.
2010-10-04 19:55:11 +02:00
Ondrej Zajicek
0d1b3c4c0e
Changes print-like filter commands to use a log instead of a stderr.
...
And extends the log subsystem to better handle that.
2010-09-20 13:01:01 +02:00
Ondrej Zajicek
2dec1e3471
Fixes a bug in pair sets.
2010-09-15 02:01:23 +02:00
Ondrej Zajicek
a58022a64e
Fixes a bug in community set delete.
2010-09-11 20:14:53 +02:00
Ondrej Filip
946dc15c92
Documentation update and improvement of tests related to expressions in sets.
2010-08-03 17:35:34 +02:00
Ondrej Filip
edaec901e1
Even set of number can be made by expressions.
2010-08-03 15:22:29 +02:00
Ondrej Filip
4733b49ed6
Syntax of sets improved.
2010-08-03 15:16:25 +02:00
Ondrej Zajicek
c477f48916
Hostcache should use trie to filter relevant route changes.
2010-07-27 18:20:12 +02:00
Ondrej Zajicek
7f0d245a5e
Minor changes in prefix trie.
2010-07-27 17:17:11 +02:00
Ondrej Zajicek
ba5c0057ed
Extends pair set syntax, matching and deleting against clist.
...
Expressions like (123,*) can be used in pair set literals, clists can be
matched against pair sets (community ~ pairset) and pair sets can be
used to specify items to delete from clists (community.delete(pairset)).
2010-05-22 22:47:24 +02:00
Ondrej Zajicek
d759c1a6f8
NEWS and version update.
2010-04-09 17:42:39 +02:00
Ondrej Zajicek
0277cc0baf
Revert "Fixes behavior of defined() on bgp_community attribute."
...
This reverts commit 74e9331fe0
.
2010-04-08 17:47:14 +02:00
Ondrej Zajicek
126683feed
Filter language updates; new route attributes and datatype.
...
- Adds bgp_originator_id and bgp_cluster_list route attributes.
- Adds dotted quad filter datatype (for router IDs, used by
bgp_originator_id and ospf_router_id route attributes).
- Fixes pair ~ pair set matching.
- Documentation updates.
2010-03-29 19:29:03 +02:00
Ondrej Zajicek
aa46124804
Clear local variables in filters and functions.
...
Fixes crash when used uninitialized variables.
This problem was surprisingly tricky to fix.
2010-03-19 09:41:18 +01:00
Ondrej Zajicek
74e9331fe0
Fixes behavior of defined() on bgp_community attribute.
2010-03-18 00:10:35 +01:00
Ondrej Zajicek
e8da1bd0b5
Fixes missing cases in filters.
2010-03-15 00:34:44 +01:00
Ondrej Zajicek
dfd48621d1
Replaces the algorithm for building balanced trees.
...
Changes the time complexity of the algorithm from O(n^2) to O(n*log(n)).
This speeds up loading of huge DEC-IX config from 128 s to 15 s. It also
makes the code significantly simpler.
2010-02-17 22:11:42 +01:00
Ondrej Zajicek
14f6aca480
Changes right recursion to left in the grammar of the case expression.
2010-02-17 11:29:48 +01:00
Ondrej Filip
0efd646278
Define symbols as text between ''.
2010-02-10 12:30:14 +01:00
Ondrej Zajicek
5f47c4c11e
Changes right-recursion to left-recursion in a filter grammar.
...
Because we don't want to have a limit on a function/filter length.
2010-02-02 00:03:46 +01:00
Ondrej Filip
1960d20350
Priority for '||' and '&&' fixed.
2010-01-27 23:45:36 +01:00
Ondrej Filip
7515dafc00
Allow multiple || and && statements.
2010-01-27 22:26:45 +01:00
Ondrej Zajicek
63542845df
Merge branch 'dev' into ospf3
...
Conflicts:
proto/ospf/lsreq.c
proto/ospf/lsupd.c
proto/ospf/rt.c
2009-12-14 20:37:32 +01:00
Ondrej Zajicek
2eece54a04
Fixes bug related to reconfiguration with bgp_path first/last operators.
2009-11-15 14:24:20 +01:00
Ondrej Zajicek
3f22fa9e74
Merge branch 'dev' into ospf3
2009-11-09 22:54:39 +01:00
Ondrej Zajicek
4cdd078453
Implements protocol-specific router id and updates documentation.
2009-10-12 23:31:42 +02:00
Ondrej Zajicek
52b9b2a178
Rename as_path_get_last/as_path_get_first to be consistent.
2009-10-12 20:44:58 +02:00
Ondrej Zajicek
7ea5b00f42
First and last accessors to as_paths.
2009-10-08 15:23:24 +01:00
Ondrej Zajicek
54fe0d9230
Fixes setting of IP addresses to route attributes (NEXT_HOP).
2009-09-18 13:59:04 +02:00
Ondrej Zajicek
db96fccb31
Fixes bug in filter rta copy-on-write.
...
Filters should try to copy-on-write just cached rtas.
2009-09-18 01:11:09 +02:00
Ondrej Zajicek
f4c6ca8c9c
Fixes preference bounds.
2009-09-17 13:35:37 +02:00
Ondrej Zajicek
05198c12f4
Some cleanups.
2009-08-27 19:01:04 +02:00
Ondrej Zajicek
b49e6f5a65
Temporary OSPFv3 development commit
2009-08-25 16:42:14 +02:00
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 Zajicek
23e563d86b
Fixes buggy prefix ~ prefix matching.
2009-05-30 00:35:35 +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 Filip
43de796b8a
Function pm_path_compare() checked just length of the bgpmasks
2009-05-29 23:04:54 +02:00
Ondrej Filip
d59405ec66
Typo in warning fixed.
2009-05-29 23:02:36 +02:00
Ondrej Filip
a6c9f0648d
Missing boolean comparison added.
2009-05-28 13:37:04 +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
c60cdd8c39
Cleanup changes
2009-03-31 21:17:00 +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
cb53039271
Rate limit for most abundant log messages
2009-02-26 14:23:54 +01:00
Ondrej Zajicek
82ba9032be
Fixes crash during some expressions
...
Bird crashed when 'bgp_path.len' was used for routes that does
not came from BGP.
2009-02-21 22:46:50 +01:00
Ondrej Zajicek
cd17c651a6
Add format for BGP_AGGREGATOR attribute
2009-02-21 17:47:56 +01:00
Ondrej Zajicek
f949163039
New syntax for bgp_path
2009-01-27 17:35:00 +01:00
Ondrej Zajicek
330aecead8
Bugfix in interpret
...
Missing cases in filter code interpret leads to crash
when bgp_next_hop attr was queried.
2008-12-25 17:49:57 +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
44711e0ca2
Fix some bugs in filter interpret.
2008-11-16 22:16:04 +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
aebe06b40c
Proper format functions for ORIGINATOR_ID, CLUSTER_LIST
2008-11-08 23:33:22 +01:00
Ondrej Zajicek
4847a894bf
Implementation of route reflection for BGP
2008-10-26 22:45:09 +01:00
Ondrej Zajicek
11cb620266
Implementation of 4B ASN support for BGP
2008-10-26 22:36:08 +01:00
Martin Mares
9831e5916f
Staticized lots of local functions.
2004-06-05 09:58:23 +00:00
Martin Mares
6ecd20605c
... and in the filter.
2004-06-05 09:26:55 +00:00
Martin Mares
6a57bb3110
Killed a couple of unused variables.
...
We really should compile with warnings enabled.
2004-05-31 20:57:38 +00: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
d85e1f0e2f
Prefix comparison bug (hopefully) fixed.
2003-02-27 10:48:30 +00:00
Martin Mares
de10a974f2
Added missing semicolons.
2002-11-13 08:46:12 +00:00
Pavel Machek
4bb18dd2da
Fix i_same for 'c' instruction.
2000-06-08 16:57:41 +00:00
Martin Mares
725270cb1d
Fixes for the programmer's manual.
2000-06-08 12:37:21 +00:00
Pavel Machek
a5a947d4d8
Fixing error messages.
2000-06-08 10:26:19 +00:00
Pavel Machek
b178d92a0b
Better messages
2000-06-08 08:24:32 +00:00
Pavel Machek
3e82b32d36
Progdocs updates
2000-06-07 14:45:55 +00:00
Pavel Machek
8dcf254499
Even better documentation of filters.
2000-06-07 14:16:11 +00:00
Pavel Machek
907503adb6
Comment fix.
2000-06-07 14:00:17 +00:00
Pavel Machek
771ae456a5
Better progdocs for filters
2000-06-07 13:54:06 +00:00
Martin Mares
2e9b24211a
Spelling fixes to progdoc.
2000-06-07 12:29:08 +00:00
Pavel Machek
4c5f93d76b
Better documentation. There are functions whose description is good when
...
reading source but whose documentation does not belong to progdocs.
2000-06-05 17:13:36 +00:00
Pavel Machek
8798c81176
Docs updates:
...
make prog.dvi
do not overflow in .dvi
include filter documentation in the system
2000-06-05 16:36:16 +00:00
Pavel Machek
98da26a0a0
Better error messages
2000-06-05 15:41:29 +00:00
Ondrej Filip
49222defff
Bug in comment. It didn't compile.
2000-06-05 15:06:26 +00:00
Pavel Machek
b093c328f5
Updates to both programmers and users doc
2000-06-05 12:52:57 +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
Martin Mares
f7667ba1c4
When cloning a rte and replacing its rta, remember to free the old one
...
so that we don't leak memory. Thanks go to the resource tracking system
for quickly discovering the source of leakages.
2000-06-04 18:46:30 +00:00
Pavel Machek
64ba9f7bcc
Do not try to divide by zero.
2000-06-02 08:01:12 +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
0b1cad8162
Complain when filter does not end in accept nor reject.
2000-05-31 21:50:13 +00:00
Pavel Machek
24e1e2005b
Another testbed for filters.
2000-05-30 11:09:09 +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
e66e6c2119
If community list is not defined, act as it is empty.
2000-05-19 16:57:40 +00:00
Pavel Machek
9f0d45d634
Finished cleanng up mess: multiplication reinstalled.
2000-05-17 12:14:05 +00:00
Martin Mares
b1c9d87161
Fixed the horrible mess Pavel has created with his last commit.
2000-05-16 22:37:53 +00:00
Pavel Machek
a96a979d5b
Line numbers for runtime errors (what's wrong with cvs? I could not
...
commit this from home)
2000-05-16 18:50:51 +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
Pavel Machek
6be662d917
Use new eval mechanism for testing filters.
2000-05-15 12:07:09 +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
ab1129c1bd
Added skeleton Doc files for the whole developer's documentation.
2000-05-05 17:17:42 +00:00
Martin Mares
9a220cabbc
#ifdef out lots of debugging information.
...
The long resource/routing table dump printed upon startup is gone now
and if you wish to see it, just send bird SIGUSR1 or use the `debug'
commands.
2000-05-04 20:52:28 +00:00
Pavel Machek
2337ade754
Moved documentation to top of file, where it belongs.
2000-04-30 18:47:48 +00:00
Pavel Machek
8c62d6e3b6
Minor documentation update.
2000-04-29 17:48:38 +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
ff95080f92
Cleanup of dead code + example documentation for two functions.
2000-04-28 09:48:28 +00:00
Pavel Machek
b0c9c21c29
Small cleanup.
2000-04-26 09:38:07 +00:00
Pavel Machek
2e5a8735f4
filter_same should now work with path masks.
2000-04-26 09:36:47 +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
471bd6c30b
Marked place where new enums belong.
2000-04-26 07:47:47 +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
0150e5211a
Cleaned up mess with types in e,a and e,S. Dynamic attributes should
...
now work.
2000-04-17 14:12:02 +00:00
Martin Mares
74a7da482b
Adding of dynamic attributes is hopefully correct now.
2000-04-17 13:41:50 +00:00
Pavel Machek
3bbc4ad6ad
Special hack for atomic_aggr.
2000-04-17 12:40:38 +00:00
Pavel Machek
708711c373
Community lists can be now accessed as dynamical attributes. Mj:
...
please create such dynamic atribute for bgp.
2000-04-17 12:38:24 +00:00
Pavel Machek
913ce95b08
EAF_ORIGINATED done right.
2000-04-17 11:52:32 +00:00
Pavel Machek
2bd2de0188
pair ~ community list matching works.
2000-04-17 11:49:21 +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
991c36b509
Use EAF_ORIGINATED as mj wanted. mj: check this!
2000-04-17 11:37:05 +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
159fa4cea9
Finish moving of path matching. Use int_set_print from core for
...
printing community lists.
2000-04-17 11:20:00 +00:00
Pavel Machek
2a40efa5e6
as_path_match moved to a-path.c
2000-04-17 11:11:33 +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
ecd25633bd
Use printing routine from nest/ instead of our own.
2000-04-17 10:54:01 +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
0a40e97328
as_path_prepend is usable outside bgp.
2000-04-12 14:12:37 +00:00
Pavel Machek
a2d157463a
One less shift/reduce conflict.
2000-04-12 14:05:37 +00:00
Pavel Machek
ac7a2145cc
f_new_dynamic_attr gets third argument, type as filters know it.
2000-04-12 14:02:04 +00:00
Martin Mares
2803c9ddbe
Minor updates by Pavel.
2000-04-12 13:55:53 +00:00
Martin Mares
66d573d490
Attribute type hack.
2000-04-12 13:55:30 +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
78c6217c1e
Path printing is now much nicer: not having to put it backward
...
simplifies it. (Sorry for previous commit, cvs is naughty).
2000-04-12 10:34:45 +00:00
Pavel Machek
9196e9f8f9
Commit fixes.
2000-04-10 16:36:40 +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
798df5b1ab
When processing ACCEPT/REJECT carrying no message, don't print
...
trailing newline.
I hope the fix is correct, but please check.
2000-04-01 09:15:55 +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
Martin Mares
3cf4a2e2b0
Removed lots of superfluous includes.
...
Use debug() instead of printf().
2000-03-31 23:35:59 +00:00
Martin Mares
221135d6bf
Include "lib/string.h" instead of <string.h>. It should give us bzero()
...
and other non-portable functions on all systems.
2000-03-31 23:30:21 +00:00
Martin Mares
3076b5aedc
Renamed FF_OUTGOING to FF_FORCE_TMPATTR which much better fits the semantics.
...
Call rte_cow() instead of rte_do_cow(), so that COW works properly.
Stripped "\n" off several (de)bug messages.
2000-03-30 08:50:30 +00:00
Pavel Machek
0a06a9b8b3
f_run gets one more parameter to distinguish between in and out modes.
2000-03-29 09:02:00 +00:00
Martin Mares
81ce667b7b
Don't crash when filter_same() gets called on FILTER_ACCEPT or FILTER_REJECT.
2000-03-12 22:40:07 +00:00
Martin Mares
6b9fa32080
Great cleanup of debug messages. LOCAL_DEBUG turned off in most modules,
...
several debug() calls converted to DBG().
2000-03-12 21:01:38 +00:00
Pavel Machek
995e5894cd
1 less shift/reduce conflict
...
print now takes arguments separated by ,
[ 1.2.3.0/24 .. 3.4.5.0/8 ] is now forbidden
[ 1.2.3.0/8 ] now actually works
2000-03-09 14:47:43 +00:00
Pavel Machek
e4a73dbfcb
CONST() is now gone
2000-03-09 13:21:40 +00:00
Martin Mares
9f4929e749
Renamed EAF_INLINE to EAF_TEMP to make the name reflect the real meaning.
2000-03-04 22:30:44 +00:00
Martin Mares
a58dad6238
Please *think* when defining operator priorities.
...
(-: num_of_parser_conflicts -= 42 :-)
2000-03-04 21:19:10 +00:00
Pavel Machek
d4d7562806
Avoid being exponential, do not allow ! =
2000-03-02 22:23:18 +00:00
Pavel Machek
62ab789de5
Added type parameter to f_new_dynamic_attr.
2000-03-01 14:42:59 +00:00
Pavel Machek
31e79264a2
tmp_attrs fixed.
...
I do not know if it is right since mj ingores talk once started :-(.
2000-03-01 14:31:31 +00:00
Martin Mares
db1326aa5e
Dynamic attributes are now declared in per-protocol grammar files instead
...
of filter/config.Y. Bird now compiles even if you disable RIP.
Removed RTA and IMPOSSIBLE tokens (unused).
Removed superfluous comment in filter.h.
I've tried to do my best, but Pavel, please check these changes.
2000-03-01 11:32:23 +00:00
Pavel Machek
2d496d2028
Get rid of 'ab'-s, added return to functions.
2000-02-25 11:15:26 +00:00
Pavel Machek
9a4037d408
filter_same() implemented. Don't bet on it, yet.
2000-01-31 17:44:22 +00:00
Pavel Machek
70844a6a46
Updated docs about filters, and added fixme.
2000-01-26 21:28:53 +00:00
Martin Mares
30a6108ccc
Added filter_same() for comparision of two filters.
...
Pavel, please implement this as soon as possible.
2000-01-16 17:49:32 +00:00
Pavel Machek
60d7d10e6f
Added fixme.
1999-12-18 20:39:53 +00:00
Martin Mares
d46ffc97ff
Kicked off F_MODIFY (not generated nor used)
1999-12-16 12:18:19 +00:00
Pavel Machek
2e18b87dcf
Disallow rta.net syntax.
1999-12-08 12:51:26 +00:00
Pavel Machek
6c14255dd6
Make rta. syntax optional.
1999-12-08 10:15:51 +00:00
Martin Mares
430da60fa2
Implemented `show route where <condition>' command.
...
Pavel, please check my addition to filter/config.Y.
1999-12-02 14:04:44 +00:00
Martin Mares
2ad6dcdb2c
Make ACCEPT/REJECT actually return the result...
1999-12-01 15:07:06 +00:00
Pavel Machek
7e1f99719e
accept should behave as return, not running any commands after it.
1999-12-01 12:54:23 +00:00
Pavel Machek
6781e5213b
FIXME's cleaned up: I have actually fixed things without killing
...
comments.
There are no urgent FIXME's in filters. Perhaps we should start with
documentation?
1999-12-01 11:39:58 +00:00
Pavel Machek
4aa885a53c
Filters: fix rta access to use ->aux field.
1999-11-25 13:42:49 +00:00
Pavel Machek
455ca441d9
Check that prefixes are really prefixes + fix config file to
...
comply. (:-( 1.2.3.4/8 looks nicer than 1.0.0.0/8).
1999-11-24 12:16:31 +00:00
Pavel Machek
8f013d9ca4
Sorry, previous commit did not even compile.
1999-11-24 12:09:58 +00:00
Pavel Machek
48f9e01954
Filters: write access to dynamic attributes should actually work. It
...
would be nice to find method of testing such beasts.
1999-11-24 12:04:32 +00:00
Pavel Machek
f31156ca21
Filters: first parts of extended attributes being read-write. It can
...
not actually work since I do not do rta/rte cow, yet.
1999-11-18 14:29:10 +00:00
Pavel Machek
c7b43f33ae
Split inst->code into inst->code and inst->aux. Both are only 16 bit,
...
so aux is suitable for storing type but not much more.
1999-11-18 14:01:36 +00:00
Pavel Machek
346a12c210
You can now print enum.
1999-11-18 13:21:52 +00:00
Martin Mares
fd54b60266
ENUM's are now recognized as constants.
1999-11-15 11:36:09 +00:00
Pavel Machek
4515bdba4f
Fixed order of arguments for function call.
...
Enumeration types should work once CF_ENUM() is ready.
Created test.conf for testing of filters. (I'm currently thinking
about ./tests in root directory which will just fire all available
tests...)
1999-11-11 13:55:39 +00:00
Pavel Machek
4ed8718a19
Shift/reduce conflict goes away _and_ if/then/else works.
1999-11-11 13:27:59 +00:00
Pavel Machek
1183b6b229
Enums do not work, this is testcase.
1999-11-10 13:59:13 +00:00
Pavel Machek
cb8034f42c
First try on enumerational types.
...
Mj's noassoc removed: this brings back shift/reduce conflict but
it makes parser actually work. Mj please check it. IF/THEN/ELSE still
will not work.
1999-11-10 13:44:29 +00:00
Pavel Machek
2f702671b4
No more shift/reduce conflicts.
1999-11-10 13:07:18 +00:00
Martin Mares
4995564570
Shift/reduce conflicts in IF/THEN/ELSE rules solved.
1999-11-10 13:05:57 +00:00
Pavel Machek
f453665704
Enumerational types, defined keyword added.
1999-11-10 12:44:07 +00:00
Pavel Machek
3c989eb4a7
Fixed comments about shift/reduce conflicts.
1999-11-04 14:05:40 +00:00
Pavel Machek
ae3e1af2a8
Add possibility of local variables.
1999-11-04 14:03:45 +00:00
Pavel Machek
91447965fe
Possibility to access first extended attributes.
1999-11-04 13:33:30 +00:00
Pavel Machek
6dc7a0cb39
Filters now do not allow function (int arg; int arg2; ).
1999-11-03 22:23:01 +00:00
Pavel Machek
41be4444f2
switch() { } done right.
1999-10-28 21:03:36 +00:00
Pavel Machek
d3dd620b96
Filters: permit variables of prefix types, cleanup around
...
variables. TODO list added, hopefully complete. Use new features of
filters in bird.conf
1999-10-12 06:27:42 +00:00
Pavel Machek
720d911d77
Added constants of type prefix and pair, added their printing
1999-10-07 14:10:08 +00:00
Pavel Machek
c9f8c1a855
FIXME's added. Hopefully fixme list is now complete for filters.
1999-10-07 13:38:26 +00:00
Pavel Machek
7db7b7db60
Case arg { 1: printf "one"; } works. You can not use two commands
...
after one label, yet.
1999-09-29 14:24:58 +00:00
Pavel Machek
2981814066
Few FIXME's removed from auth, few FIXME's added to filter.
1999-08-20 09:59:39 +00:00
Martin Mares
9a706f32af
Added missing structure declarations.
1999-08-03 19:31:11 +00:00
Pavel Machek
6542ece91a
Function calling in filters works - somehow. Calling syntax is
...
currently very ugly, beware. Variables are not really local - that
needs to be fixed.
1999-07-01 09:11:21 +00:00
Martin Mares
4107df1d1b
Implemented two new symbol handling functions:
...
o cf_define_symbol() -- it assigns a meaning to a symbol, bailing
out if it already has one.
o cf_find_symbol() -- finds symbol by name and creates it if not found.
Also modified filter/config.Y to make use of the first function.
1999-05-17 20:06:19 +00:00
Pavel Machek
36bbfc704c
Updated filters: they now actually see IP/pxlen of net being filtered,
...
gateway, and who told us, so they can do usefull jobs from now on.
1999-04-19 18:41:56 +00:00
Pavel Machek
43fc099b98
Sets of IP addresses should work, now. (From now on it is also
...
possible to write if 1.2.3.4 < 1.2.3.5, but I'm not sure if it is good
for anything.)
1999-04-13 11:40:04 +00:00
Pavel Machek
38506f71b0
Sets of integers now actually work. Sets of IP will work as soon as
...
compare function is ready.
1999-04-12 19:58:18 +00:00
Pavel Machek
bad631e048
Oops, typo.
1999-04-12 12:07:15 +00:00
Pavel Machek
8ba2cc064b
In case no startup function is defined, don't try to launch it.
1999-04-12 12:01:59 +00:00
Pavel Machek
2db3b2887e
Decrease number of warnings.
1999-04-10 09:45:08 +00:00
Pavel Machek
23b1539bf9
Filters upgraded - a bit. Moved code to filter.c because it is where
...
it belongs. (f-util.c stays there for auxiliary and non-important things.)
1999-04-07 12:11:08 +00:00
Martin Mares
63a381dbf5
Several filter changes. (Pavel, please check if they are OK.)
...
o Changed parameters of f_run. Changed rtein+rteout pair to rte pointer
passed by reference, added ea_list of temporary attrs again passed
by reference and finally added a pointer to memory pool for storing
temporary data (new ea_lists's, temporary rta's etc.).
o Re-ordered result codes, so that all accepts come before all rejects.
o Introduced FILTER_ACCEPT and FILTER_REJECT dummy values (will be
used in protocol configurations).
o Added filter_name() which returns name of a filter or ACCEPT/REJECT
for the dummies.
1999-04-05 20:10:31 +00:00
Martin Mares
78d5ec1504
Please don't commit debugging code which makes BIRD exit before anything
...
actually starts to happen. Grrr.
1999-03-29 20:28:25 +00:00
Pavel Machek
ba92164871
Update of filters towards new interface.
1999-03-29 20:21:28 +00:00
Martin Mares
e0f2e42f4f
A couple of filter tweaks:
...
o Introduced struct filter which serves as an external reference
to filter. Using struct symbol for this is unwise since it doesn't
allow extra information attached to the filter and it also forces
all filters to be named.
o Implemented config rule 'filter' which matches either named filter
or an embedded unnamed filter (`{ <filter> }').
o Fixed totally bogus comment at the top of filter.h.
o Added a missing prototype for f_run() to filter.h.
1999-03-17 14:29:39 +00:00
Pavel Machek
3c7ad64c57
Compilation fix for mj.
1999-03-17 13:04:33 +00:00
Pavel Machek
d36d838df5
accept & reject should now work
1999-03-17 10:19:07 +00:00
Pavel Machek
2575593e0f
Resolved conflicts, you no longer need to wrap constants in const()
1999-03-09 14:45:27 +00:00
Pavel Machek
b700582445
Filters are now a tiny bit stronger (if is actually working ;-)
1999-03-08 20:30:06 +00:00
Pavel Machek
84c7e1943f
Add interface for running filters (please comment!), avoid bison warnings
1999-03-02 19:49:28 +00:00
Pavel Machek
292099d55f
Few fixes in parsing of filters
1999-02-03 12:28:16 +00:00
Pavel Machek
ca3d562b24
filters_init() renamed to filters_postconfig().
1999-01-15 18:13:55 +00:00
Martin Mares
c9b6670608
Original expr' is back, filter expressions renamed to
term'.
...
In the future, we'll allow any filter term in place of `expr' and we'll
just evaluate it immediately, but not now as we have no evaluation
routines.
1999-01-15 18:04:28 +00:00
Pavel Machek
b9d70dc84e
Filters, second try. This time they have their own directory.
1999-01-15 16:49:17 +00:00