Commit graph

92 commits

Author SHA1 Message Date
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
6a8d3f1c1f BFD work in progress.
Now it compiles and mostly works.
2013-09-16 23:57:40 +02:00
Ondrej Zajicek
b662290f40 Separate import and receive limits.
They have different behavior w.r.t. filtered routes that are kept.
2013-01-10 13:07:33 +01:00
Ondrej Zajicek
1555095795 Changes 'rejected' to 'filtered' in one of the last patches. 2012-11-15 01:29:01 +01:00
Ondrej Zajicek
cf98be7b67 Allows rejected routes to be kept and examined.
When 'import keep rejected' protocol option is activated, routes
rejected by the import filter are kept in the routing table, but they
are hidden and not propagated to other protocols. It is possible to
examine them using 'show route rejected'.
2012-11-10 14:26:13 +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
5400c0e7f9 Fixes BGP subcode during global shutdown. 2012-08-06 02:42:24 +02:00
Ondrej Zajicek
ab758e4fb2 Some fixes in route export limits. 2012-04-28 12:59:40 +02:00
Ondrej Zajicek
d9b77cc281 Implements generalized export limits.
And also fixes some minor bugs in limits.
2012-04-24 23:39:57 +02:00
Ondrej Zajicek
7d0a31deed Fixes in generalized import limits. 2012-04-21 21:05:36 +02:00
Ondrej Zajicek
ebecb6f6a1 Implements generalized import hooks.
Thanks to Alexander V. Chernikov for the original patch.
2012-04-15 15:28:29 +02:00
Ondrej Zajicek
bf2abe2f51 Merge branch 'soon'
Conflicts:

	nest/proto.c
	nest/rt-table.c
2012-03-30 11:04:12 +02:00
Ondrej Zajicek
fb829de690 Fixes responsiveness for protocol shutdown.
When a protocol went down, all its routes were flushed in one step, that
may block BIRD for too much time. The patch fixes that by limiting
maximum number of routes flushed in one step.
2012-03-28 18:40:04 +02:00
Ondrej Zajicek
c0adf7e9fc Better support for multitable protocols.
The nest-protocol interaction is changed to better handle multitable
protocols. Multitable protocols now declare that by 'multitable' field,
which tells nest that a protocol handles things related to proto-rtable
interaction (table locking, announce hook adding, reconfiguration of
filters) itself.

Filters and stats are moved to announce hooks, a protocol could have
different filters and stats to different tables.

The patch is based on one from Alexander V. Chernikov, thanks.
2012-03-15 12:13:04 +01:00
Ondrej Zajicek
39c028e9e9 Assign default protocol preference via proto_config_new().
The patch from Alexander V. Chernikov.
2012-01-24 11:31:00 +01:00
Ondrej Zajicek
be4cd99a36 Implements deterministic MED handling.
Thanks to Alexander V. Chernikov for many suggestions.
2011-12-22 13:20:29 +01:00
Ondrej Zajicek
a7f23f581f Implements protocol templates.
Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
2011-11-07 00:31:23 +01:00
Ondrej Zajicek
93e868c730 Implements Router Advertisement protocol. 2011-03-13 11:33:50 +01:00
Ondrej Zajicek
cfe34a316e Implements hostcache and recursive next hops.
Hostcache is a structure for monitoring changes in a routing table that
is used for routes with dynamic/recursive next hops. This is needed for
proper iBGP next hop handling.
2010-07-05 17:50:19 +02:00
Ondrej Zajicek
b8113a5e92 Implements BGP 'show protocols' info details. 2010-04-07 00:19:23 +02:00
Ondrej Zajicek
ff2857b03d Many changes in (mainly) kernel syncers.
- BSD kernel syncer is now self-conscious and can learn alien routes
- important bugfix in BSD kernel syncer (crash after protocol restart)
- many minor changes and bugfixes in kernel syncers and neighbor cache
- direct protocol does not generate host and link local routes
- min_scope check is removed, all routes have SCOPE_UNIVERSE by default
- also fixes some remaining compiler warnings
2010-02-26 10:55:58 +01:00
Ondrej Zajicek
e0a45fb421 Restricted read-only CLI.
Also adds support for executing commands using birdc <cmd>.
2010-02-21 09:57:26 +01:00
Ondrej Zajicek
e304fd4bcf Implements pattern match for 'show protocols' command.
And generally consolidates protocol commands.
2010-02-20 00:08:07 +01:00
Ondrej Zajicek
dca75fd7c2 Removes phantom protocol from the pipe design.
It seems that by adding one pipe-specific exception to route
announcement code and by adding one argument to rt_notify() callback i
could completely eliminate the need for the phantom protocol instance
and therefore make the code more straightforward. It will also fix some
minor bugs (like ignoring debug flag changes from the command line).
2010-02-13 12:26:26 +01:00
Ondrej Zajicek
9db74169be Fixes protocol statistics for pipes. 2010-02-13 10:44:46 +01:00
Ondrej Zajicek
c83876265e Fixes a tricky bug in the pipe protocol.
When uncofiguring the pipe and the peer table, the peer table was
unlocked when pipe protocol state changed to down/flushing and not to
down/hungry. This leads to the removal of the peer table before
the routes from the pipe were flushed.

The fix leads to adding some pipe-specific hacks to the nest,
but this seems inevitable.
2010-02-11 22:27:06 +01:00
Ondrej Zajicek
cf31112f0d Implements MRTdump feature. 2010-01-03 12:17:52 +01:00
Ondrej Zajicek
8a7fb8858f Finishes 'route reload' feature. 2009-12-14 01:32:37 +01:00
Ondrej Zajicek
11361a1015 Implements route re-feed.
This can be used to re-feed routes to protocol after soft change in
export filters.
2009-12-02 22:19:47 +01:00
Ondrej Zajicek
bf47fe4b2e Implements BGP route refresh. 2009-11-26 20:47:59 +01:00
Ondrej Zajicek
e04555c045 Implement description field of protocol. 2009-11-17 15:45:05 +01:00
Ondrej Zajicek
4cdd078453 Implements protocol-specific router id and updates documentation. 2009-10-12 23:31:42 +02:00
Ondrej Zajicek
bf1aec970e Adds support for soft reconfiguration. 2009-06-19 23:49:34 +02:00
Ondrej Zajicek
925fe2d3de Implements route statistics and fixes some minor bugs. 2009-06-04 01:22:56 +02:00
Ondrej Zajicek
23ac9e9a9e Changes pipes to transfer all routes between routing table, not just optimal routes. 2009-05-31 15:24:27 +02:00
Ondrej Zajicek
aebe06b40c Proper format functions for ORIGINATOR_ID, CLUSTER_LIST 2008-11-08 23:33:22 +01:00
Martin Mares
ac5d801217 Asynchronous feeding of protocols. 2000-05-19 10:46:26 +00:00
Martin Mares
df9f0fb30a Don't log state changes if nothing user-visible has changed. 2000-05-16 13:43:26 +00:00
Martin Mares
08f0290a1e Changed semantics of the rt_update hook. The attribute list we pass now
contains all attributes, not just the temporary ones. This avoids having
to merge the lists inside protocols or doing searches on both of them.

Also, do filtering of routes properly. (I'd like to avoid it, but it's
needed at least in the krt protocol.)
2000-05-13 11:00:37 +00:00
Martin Mares
ce1da96ee7 Added commands show route protocol <p>' and show route import <p>' which
show the routing table as exported to the protocol given resp. as returned
from its import control hook.

To get handling of filtered extended attributes right (even in the old
`show route where <filter>' command), the get_route_info hook gets an
attribute list and all protocol specific rte attributes are contained
there as temporary ones. Updated RIP to do that.

Added ea_append() which joins two ea_list's.
2000-05-06 22:57:39 +00:00
Martin Mares
67be5b23cd When rte_update is called for an identical route, don't announce anything.
Please implement the rte_same hook in your protocols. It should just
compare your metrics stored directly in rte, the rest is done by the core.
2000-05-06 21:21:19 +00:00
Martin Mares
3991d84e8f Changed initialization of protocol list -- now we call proto_build() instead
of calling the protocols manually.

Implemented printing of dynamic attributes in `show route all'.

Each protocol can now register its own attribute class (protocol->attr_class,
set to EAP_xxx) and also a callback for naming and formatting of attributes.
The callback can return one of the following results:

	GA_UNKNOWN	Attribute not recognized.
	GA_NAME		Attribute name recognized and put to the buffer,
			generic code should format the value.
	GA_FULL		Both attribute name and value put to the buffer.

Please update protocols generating dynamic attributes to provide
the attr_class and formatting hook.
2000-04-01 10:19:47 +00:00
Martin Mares
2638249d34 Bare skeleton of the BGP. 2000-03-19 22:09:07 +00:00
Martin Mares
6a9f28b0b9 Added tracing of interface events. 2000-03-12 20:50:35 +00:00
Martin Mares
96d8e3bff2 Added protocol debugging flags (protocol.h: D_xxx), parsing of them
in configuration files and commands for manipulating them.

Current debug message policy:

   o  D_STATES, D_ROUTES and D_FILTERS are handled in generic code.
   o  Other debug flags should be handled in the protocols and whenever
      the flag is set, the corresponding messages should be printed
      using calls to log(L_TRACE, ...), each message prefixed with
      the name of the protocol instance. These messages should cover
      the whole normal operation of the protocol and should be useful
      for an administrator trying to understand what does the protocol
      behave on his network or who is attempting to diagnose network
      problems. If your messages don't fit to the categories I've defined,
      feel free to add your own ones (by adding them to protocol.h
      and on two places in nest/config.Y), but please try to keep the
      categories as general as possible (i.e., not tied to your protocol).
   o  Internal debug messages not interesting even to an experienced
      user should be printed by calling DBG() which is either void or
      a call to debug() depending on setting of the LOCAL_DEBUG symbol
      at the top of your source.
   o  Dump functions (proto->dump etc.) should call debug() to print
      their messages.
   o  If you are doing any internal consistency checks, use ASSERT
      or bug().
   o  Nobody shall ever call printf() or any other stdio functions.

Also please try to log any protocol errors you encounter and tag them
with the appropriate message category (usually L_REMOTE or L_AUTH). Always
carefully check contents of any message field you receive and verify all
IP addresses you work with (by calling ipa_classify() or by using the
neighbour cache if you want to check direct connectedness as well).
2000-03-07 20:49:48 +00:00
Martin Mares
7293c5dd81 Added proto->hash_key which contains randomly generated hash key used
for calculation of hash functions depending on proto.
2000-03-01 14:49:07 +00:00
Martin Mares
3ea1ba632b Killed protocol->priority. Protocol startup should be clean and hack-free now.
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).
2000-01-18 11:01:03 +00:00
Martin Mares
54aaa89ada protocol->startup_counter no longer exists. 2000-01-18 10:42:45 +00:00
Martin Mares
d272fe22dd Separated `official protocol names' used in status dumps from name templates
used for automatic generation of instance names.

	protocol->name is the official name
	protocol->template is the name template (usually "name%d"),
		should be all lowercase.

Updated all protocols to define the templates, checked that their configuration
grammar includes proto_name which generates the name and interns it in the
symbol table.
2000-01-17 11:52:50 +00:00
Martin Mares
f14a4becbe Reworked proto lists -- each proto is now in two lists: the global one
(proto_list) and per-type one (original lists). A lot of things simplified.

Implemented `disable', `enable' and `restart' CLI commands.
2000-01-16 23:30:06 +00:00