Commit graph

142 commits

Author SHA1 Message Date
Jan Moskyto Matejka 3e236955c9 Build: switch on -Wextra, get rid of most of the warnings
There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.
2016-11-01 14:52:54 +01:00
Ondrej Filip 3213273d82 IANA assigned a different number to large BGP communities - changed. 2016-10-27 11:08:28 +02:00
Ondrej Zajicek (work) 66dbdbd993 BGP: Support for large communities
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-10-03 12:48:56 +02:00
Ondrej Zajicek (work) a7baa09862 BSD: Add the IPsec SA/SP database entries control
Add code for manipulation with TCP-MD5 keys in the IPsec SA/SP database
at FreeBSD systems. Now, BGP MD5 authentication (RFC 2385) keys are
handled automatically on both Linux and FreeBSD.

Based on patches from Pavel Tvrdik.
2016-04-13 14:37:09 +02:00
Ondrej Zajicek 06e0d1b692 BGP: Extended messages support
Implements draft-ietf-idr-bgp-extended-messages-10, for now
undocumented and with temporary private capability number.
2015-07-18 13:38:21 +02:00
Ondrej Zajicek 8d9eef1771 BGP multipath support
Kernel option 'merge paths' allows to merge routes exported to kernel
protocol (currently BGP and static routes) to multipath routes.
2015-06-08 02:24:08 +02:00
Pavel Tvrdík ae80a2de95 unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
Ondrej Zajicek 9aed29e605 BGP: Enhanced route refresh (RFC 7313) support
Also hook feed_done is renamed to feed_end.
2015-03-29 18:29:49 +02:00
Ondrej Zajicek 6cf72d7ad7 Rename BGP option 'start delay' to 'connect delay'
Also update log message for error-triggered startup delay.
2015-02-22 17:21:54 +01:00
Ondrej Zajicek 523f020b5f Link state support in BGP.
Configurable fast shutdown of a BGP session when an interface loses link.
2015-02-21 12:15:56 +01:00
Ondrej Zajicek dcde7ae597 Allows to configure different remote port for BGP sessions.
Thanks to João Taveira Araújo for the original patch.
2014-10-02 12:52:50 +02:00
Ondrej Zajicek 0c791f873a BGP graceful restart support.
Also significant core protocol state changes needed for that,
global graceful restart recovery state and kernel proto support
for recovery.
2014-03-20 14:07:12 +01:00
Ondrej Zajicek e7d2ac4401 Finishes add-path.
Fixes some bugs and uses generic hash implementation.
2013-12-01 13:49:42 +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 77e43c8b72 Minor fixes. 2013-11-22 22:49:04 +01:00
Ondrej Zajicek 0aeac9cb7f Merge commit 'origin/bfd' 2013-11-22 02:48:44 +01:00
Ondrej Zajicek 1ec522538f BFD protocol, ready for release.
Supports OSPF and BGP and also statically configured sessions.
2013-11-19 22:33:48 +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 ac57451348 Implements RFC 6608 Subcodes for BGP FSM Error. 2013-07-25 13:55:24 +02:00
Ondrej Zajicek 48bc232f08 Implements 'next hop keep' option for BGP.
This option allows to keep the received next hop even in cases when
the route is sent to an interface with a different subnet.
2013-04-16 17:27:34 +02: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 abced4a914 Merge branch 'rt-accepted'
Conflicts:

	nest/config.Y
	nest/rt-table.c
	proto/bgp/bgp.c
2012-07-16 14:44:45 +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 00a09f3c36 Implement RA_ACCEPTED mode of route propagation. 2012-04-15 15:07:58 +02:00
Ondrej Zajicek 53ffbff39f Implements support for link-local addresses in BGP.
Thanks Matthias Schiffer for the original patch.
2012-01-08 15:31:34 +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 b1b1943360 The generalized TTL security mechanism (RFC 5082) support.
Thanks to Alexander V. Chernikov for the patch.
2011-08-16 23:13:05 +02:00
Ondrej Zajicek 42a0c05408 BGP Extended communities. 2011-08-14 13:55:02 +02:00
Ondrej Zajicek 73272f04af Adds BGP option related to MED handling.
Adds option 'med metric' allows to compare MEDs
between routes received from different neighbors.
2011-04-22 16:13:27 +02:00
Ondrej Zajicek d1e146f2f8 Implements IGP metric comparison for BGP routes. 2010-07-31 01:04:32 +02:00
Ondrej Zajicek 087cecd0e2 Adds some options and documentation related to recursive next hops. 2010-07-13 12:48:23 +02:00
Ondrej Zajicek 9be9a26413 Implements proper multihop BGP.
Also does some incompatible changes to config file syntax,
like removing 'via IP' from multihop option.
2010-07-12 17:39:39 +02: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 a34b09349e Disable BGP protocol when cannot open listening socket. 2010-05-31 11:35:29 +02:00
Ondrej Zajicek b8113a5e92 Implements BGP 'show protocols' info details. 2010-04-07 00:19:23 +02: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 41677025ee Changes 'ignore communities' to 'interpret communities'. 2010-01-28 15:59:18 +01:00
Ondrej Zajicek 6cb8f742f1 Better handling of well-known communities.
Process well-known communities before the export filter (old behavior is
to process these attributes after, which does not allow to send route
with such community) and just for routes received from other BGP
protocols. Also fixes a bug in next_hop check.
2010-01-27 17:22:57 +01:00
Ondrej Zajicek cf31112f0d Implements MRTdump feature. 2010-01-03 12:17:52 +01:00
Ondrej Zajicek 43c1ceccb9 Remove bgp_as4_support variable. 2009-12-14 23:31:25 +01:00
Ondrej Zajicek bf47fe4b2e Implements BGP route refresh. 2009-11-26 20:47:59 +01:00
Ondrej Zajicek 3f9b7bfe9f Implements option that controls IPv6 BGP next hops when lladdr is missing. 2009-11-18 20:32:36 +01:00
Ondrej Zajicek 3228c72cc0 Implements RFC 5004 - prefer older external routes. 2009-11-17 11:41:29 +01:00
Ondrej Zajicek be6e39ebbf Passive option. 2009-09-24 22:12:11 +02:00
Ondrej Zajicek 46eb80d5d5 Fixes headers for uintptr_t (and build on NetBSD). 2009-09-17 17:52:36 +02:00
Ondrej Zajicek b99d378698 Minor BGP changes related to error wait time. 2009-06-07 00:38:38 +02:00
Ondrej Zajicek dd91e46765 Differentiate between error delay and connect/reconnect delay.
The difference is here to reject incoming connections in the
first case.
2009-06-06 18:16:22 +02:00
Ondrej Zajicek 72b28a041d Implements import route limits. 2009-06-04 13:31:09 +02:00
Ondrej Zajicek 4827b69ff4 Fixes BGP IPv6 link local next hop handling.
When sending 'third party' BGP update, Bird used bogus link local
addresses instead of addresses it received before.
2009-04-29 18:58:24 +02:00
Ondrej Zajicek ad440a570b Fixes handling of 'next hop self' and 'source address' configuration
options.
2009-04-28 18:11:56 +02:00
Ondrej Zajicek e8ba557c7f Update capability handshake options
Add 'capabilities' option, change default behavior to advertise ipv4,
add some checks and ignore incoming capabilities when capabilities
are disabled.
2009-03-13 12:49:44 +01:00
Ondrej Zajicek e3299ab148 Added Cisco and Quagga capability workaround option. 2009-03-05 11:52:47 +01:00
Ondrej Zajicek cb53039271 Rate limit for most abundant log messages 2009-02-26 14:23:54 +01:00
Ondrej Zajicek 165a622727 Adds support for fallback to capabilityless BGP connect
When capability related error is received, next connect will be
without capabilities. Also cease error subcodes descriptions
(according to [RFC4486]) are added.
2008-12-24 17:24:41 +01:00
Ondrej Zajicek 11b32d9117 Major changes to BGP
Fixes two race conditions causing crash of Bird, several unhandled
cases during BGP initialization, and some other bugs. Also changes
handling of startup delay to be more useful and implement
reporting of last error in 'show protocols' command.
2008-12-19 01:34:39 +01:00
Ondrej Zajicek aebe06b40c Proper format functions for ORIGINATOR_ID, CLUSTER_LIST 2008-11-08 23:33:22 +01:00
Ondrej Zajicek a92fe60717 Implementation of route server. 2008-11-01 12:55:43 +01:00
Ondrej Zajicek ba5ed6f3e4 Implementation of an option for disabling AS4 support per BGP instance. 2008-10-26 22:48:02 +01:00
Ondrej Zajicek 4847a894bf Implementation of route reflection for BGP 2008-10-26 22:45:09 +01:00
Ondrej Zajicek d51aa28190 Implementation of MD5 authentication of BGP sessions. 2008-10-26 22:42:39 +01:00
Ondrej Zajicek 11cb620266 Implementation of 4B ASN support for BGP 2008-10-26 22:36:08 +01:00
Martin Mares 11d4474c17 Better selection of link-local NLRI addresses, at least for our own
address. Need to do it better for the other neighbors -- the current
solution works only if they use the standard 64+64 global addresses
and the interface identifier in lower 64 bits is the same as for the
link-scope addresses.
2003-02-22 22:47:45 +00:00
Martin Mares 5e88d73025 BGP now reports originating AS and origin type in get_route_info(). 2000-05-19 11:01:41 +00:00
Martin Mares 93d6bf38a6 The bgp_list is gone. Incomming connections are now handled in a much
more straightforward manner by scanning the active configuration for
matching protocols.
2000-05-08 13:26:30 +00:00
Martin Mares cf3d6470d7 IPv6 BGP support finished. Also simplified the BGP stuff a bit. 2000-05-04 20:02:56 +00:00
Martin Mares 1c1da87b27 Receive-only IPv6 BGP. 2000-05-04 09:03:31 +00:00
Martin Mares 85368cd4b7 Full protocol tracing. 2000-05-02 16:07:41 +00:00
Martin Mares cea6366400 The `bgp_origin' attribute is now an enum. 2000-04-28 15:13:29 +00:00
Martin Mares 6fd766c17e Implemented automatic restart after error with all the timers needed. 2000-04-25 23:08:31 +00:00
Martin Mares efcece2da3 Better reporting of both local and remote errors. 2000-04-25 21:13:25 +00:00
Martin Mares 8b258e4e65 LOCAL_PREF is now always present and exported over all ibgp connections [draft]
Allow setting of address of the local end of the TCP connection.

Several bug fixes.
2000-04-21 13:01:28 +00:00
Martin Mares 2a9e064d7b If no NLRI's are present in an UPDATE message, parse the attributes, but
don't check presence of mandatory attributes. [draft-09]
2000-04-21 12:25:35 +00:00
Martin Mares bd2d8190dd Honor standard communities (no_export, no_advertise, no_export_subconfed)
when exporting routes.
2000-04-17 13:13:08 +00:00
Martin Mares 56a2bed46b Don't import/export MED and LOCAL_PREF on external links.
Added real comparison of BGP routes (inspired by the Cisco one).
Default local preference and default MED are now settable.
Defined filter keywords for all BGP attributes we know.
2000-04-17 12:46:07 +00:00
Martin Mares 1ed2fe9609 Send and receive communities. 2000-04-17 10:19:15 +00:00
Martin Mares f421cfdd80 Sending of update messages works! 2000-04-17 09:37:31 +00:00
Martin Mares c0668f3696 Created nest/a-path.c and a-set.c which should contain general operations
on AS paths and community sets.

Moved as_path_prepend() there.

Pavel, please move the other functions as well.
2000-04-17 07:53:29 +00:00
Martin Mares c8f685cb9d Made last Pavel's changes compile. 2000-04-12 14:14:47 +00:00
Martin Mares c2b28c9910 Real bucket lists. 2000-04-12 14:09:26 +00:00
Martin Mares ae8f558499 Implemented outgoing attribute cache. 2000-04-10 12:39:51 +00:00
Martin Mares 48e842cc98 Use neighbor cache to track direct route to the peer or multihop destination.
Calculate next_hop properly based on the local address we get from the
neighbor entry.
2000-04-10 11:21:40 +00:00
Martin Mares ef2c708dfa More BGP progress...
For Pavel: You can use bgp_path_prepend() for prepending AS numbers to AS paths.
2000-04-09 22:05:02 +00:00
Martin Mares 10be74da20 Formatting of dynamic attributes (except for paths and communities which
will be added soon).
2000-04-01 10:21:11 +00:00
Martin Mares c00d31befa Parsing of BGP attributes. 2000-03-31 23:21:37 +00:00
Martin Mares 973399ae2c Basic analysis of UPDATE packets. 2000-03-30 18:44:23 +00:00
Martin Mares b552ecc4d7 Connection state machine works. 2000-03-30 17:39:48 +00:00
Martin Mares 3fdbafb6f4 More BGP. This time it connects, but the state machine still isn't complete. 2000-03-30 10:44:20 +00:00
Martin Mares 72a6ef11fe Construction of BGP packets. 2000-03-21 15:53:50 +00:00
Martin Mares c01e37416d Started work on BGP. Wrote main part of the connection handling code. 2000-03-20 21:50:17 +00:00
Martin Mares 2638249d34 Bare skeleton of the BGP. 2000-03-19 22:09:07 +00:00