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 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)
775a5a8195
BGP: Skip empty path segments in received AS_PATH
...
Although RFC 4271 does not forbid empty path segments, they are useless
and some implementations consider them invalid. It is clarified in RFC 7606,
specifying that AS_PATH with empty segment is considered malformed.
2016-06-29 14:24:32 +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
dfc7a6c6a0
Fixes potential alignment bug in BGP.
...
Thanks to Andrew (seti.kr.ua) for the bug report.
2015-02-21 12:24:30 +01:00
Ondrej Zajicek
88a183c6c9
Integrated IP functions.
2014-10-24 11:11:43 +02: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
a15dab76f9
Implements 'allow local as' option.
...
Similar to allowas-in option on other routers.
2013-10-21 14:59:35 +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 Filip
e16469bc4d
AS# in bgp.agreggator was a signed integer - fixed.
2012-11-12 13:48:29 +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
26822d8fe1
Finalize RA_ACCEPTED handling.
2012-07-16 01:33:02 +02:00
Ondrej Zajicek
3ce1714279
Fixes a new bug in BGP route ordering.
2012-01-20 16:20:03 +01: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
6c4df70373
Fixes possible buffer overflow when printing BGP attributes.
...
Thanks to Alexander V. Chernikov for the patch.
2011-09-03 21:59:40 +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
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
06fb60c4af
Fixes some problems in BGP error handling.
2011-03-30 01:09:18 +02:00
Ondrej Zajicek
7e95c05d88
Core multipath support.
2010-12-07 23:33:55 +01:00
Ondrej Zajicek
d1e146f2f8
Implements IGP metric comparison for BGP routes.
2010-07-31 01:04:32 +02:00
Ondrej Zajicek
ac3ac49a71
Adds route resolvability test.
2010-07-28 13:13:34 +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
6b5a8649a4
Do not export empty community list attribute in BGP.
2010-04-08 17:56:56 +02:00
Ondrej Zajicek
3075824dbd
Comparing cluster list length should be later in bgp_rte_better().
2010-02-26 14:09:24 +01:00
Ondrej Zajicek
e81b440f68
Fix configure to enable warnings and fix most of them.
2010-02-21 14:34:53 +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
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
fbcb7d5faf
Change default LOCAL_PREF attribute to 100 (suggested value by RFC 4277).
2009-12-21 11:50:42 +01:00
Ondrej Zajicek
0225ea4edd
Merge branch 'ospf3' into new
2009-12-15 00:32:13 +01:00
Ondrej Zajicek
f2d7da742b
Fixes export of routes with link-local gw.
2009-12-15 00:30:07 +01:00
Ondrej Zajicek
43c1ceccb9
Remove bgp_as4_support variable.
2009-12-14 23:31:25 +01:00
Ondrej Zajicek
d0e2d6d1e0
Show both IPv6 next hop addresses in BGP.
2009-11-17 14:17:23 +01:00
Ondrej Zajicek
3228c72cc0
Implements RFC 5004 - prefer older external routes.
2009-11-17 11:41:29 +01: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
05198c12f4
Some cleanups.
2009-08-27 19:01:04 +02:00
Ondrej Zajicek
949bd34e81
Fixes bug related to AS2->AS4 conversion.
2009-08-25 19:01:37 +02:00
Ondrej Zajicek
da95a7a7da
Fixes bug in ORIGIN check.
2009-06-23 11:00:38 +02:00
Ondrej Zajicek
29c430f856
Changes handling of AS_PATH_CONFED_* segments in AS_PATH.
...
Although standard says that if we receive AS_PATH_CONFED_*
(and we are not a part of a confederation) segment, we should
drop session, nobody does that and it is unwise to do that.
Now we drop session just in case that peer ASN is in
AS_PATH_CONFED_* segment (to detect peer that considers BIRD
as a part of its confederation).
2009-06-23 10:50:57 +02:00
Ondrej Zajicek
b7a735ea9d
Allow 'third party' BGP updates for originated routes.
2009-04-29 22:17:40 +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
f307842ad8
Fixes BGPv6 bug - mandatory attributes weren't validated;
2009-04-23 14:44:02 +02:00
Ondrej Zajicek
b9539e78d8
Fixes bug in BGPv6 causing crash by checking missing attributes.
2009-04-23 12:36:24 +02:00
Ondrej Zajicek
48d79d521c
Better handling of AS4 optional attribute errors
...
AS4 optional attribute errors were handled by session
drop (according to BGP RFC). This patch implements
error handling according to new BGP AS4 draft (*)
- ignoring invalid AS4 optional attributes.
(*) http://www.ietf.org/internet-drafts/draft-chen-rfc4893bis-02.txt
2009-03-18 20:30:21 +01:00
Ondrej Zajicek
82a79586e5
Better handling of too long attributes
...
This patch extends the length for attributes from 1024 to 2048
(because both AS_PATH and AS4_PATH attributes take 2+4 B per AS).
If there is not enough space for attributes, Bird skips that
route group. Old behavior (skipping remaining attributes)
leads to skipping required attributes and session drop.
2009-02-27 15:24:46 +01:00
Ondrej Zajicek
cd17c651a6
Add format for BGP_AGGREGATOR attribute
2009-02-21 17:47:56 +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
b6bf284a90
Bugfixes in MULIT_EXIT_DISC attribute handling.
...
- Old MED handling was completely different from behavior
specified in RFCs - for example they havn't been propagated
to neighboring areas.
- Update tie-breaking according to RFC 4271.
- Change default value for 'default bgp_med' configuration
option according to RFC 4271.
2008-10-26 22:59:21 +01:00
Ondrej Zajicek
4819c3e17a
Bugfix in LOCAL_PREF attribute handling.
2008-10-26 22:54:23 +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
11cb620266
Implementation of 4B ASN support for BGP
2008-10-26 22:36:08 +01:00
Ondrej Filip
85ae398a61
The source address configuration in BGP added.
2008-08-24 23:20:46 +00:00
Ondrej Filip
98ac61766d
A lot of changes:
...
- metric is 3 byte long now
- summary lsa originating
- more OSPF areas possible
- virtual links
- better E1/E2 routes handling
- some bug fixes..
I have to do:
- md5 auth (last mandatory item from rfc2328)
- !!!!DEBUG!!!!! (mainly virtual link system has probably a lot of bugs)
- 2328 appendig E
2004-06-25 16:39:53 +00:00
Martin Mares
e21423bab8
... in BGP.
2004-06-05 09:27:17 +00:00
Ondrej Filip
7fdd338c36
ALIGN -> BIRD_ALIGN
2004-06-01 10:28:25 +00:00
Martin Mares
de10a974f2
Added missing semicolons.
2002-11-13 08:46:12 +00:00
Martin Mares
54e55169da
BGP documented.
2000-06-04 17:06:18 +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
02bd064ab7
Adapted to new rt_notify semantics.
2000-05-13 11:02:02 +00:00
Martin Mares
2138d3b4d8
Use correct flags for the LOCAL_PREF attribute.
...
When an invalid attribute is found, copy the entire attribute to the data
section of the NOTIFICATION message.
2000-05-11 12:20:07 +00:00
Martin Mares
beaf86e13c
Removed RTS_RIP_EXT.
2000-05-04 21:23:10 +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
d1a74339d4
Handle redistribution of unknown attributes correctly.
2000-05-02 12:51:39 +00:00
Martin Mares
cea6366400
The `bgp_origin' attribute is now an enum.
2000-04-28 15:13:29 +00:00
Martin Mares
54896cbdba
Path attribute can be missing if we process a packet with empty NLRI section.
2000-04-27 22:31:11 +00:00
Martin Mares
5db9bae286
IBGP fixes.
2000-04-26 13:26:31 +00:00
Martin Mares
99f70c78e1
Use the same attribute names as in filters.
2000-04-25 21:31:15 +00:00
Martin Mares
684c25d98f
When sending BGP attributes, re-create the flags, so that attributes
...
added by filters which get the flags wrong are fixed automagically.
2000-04-25 21:21:52 +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
7787ace61a
Synced to draft-ietf-idr-bgp4-09.
2000-04-20 22:54:22 +00:00
Martin Mares
f381cdce52
The ATOMIC_AGGREGATE parameter is optional transitive.
2000-04-19 13:54:17 +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
e3558ab14e
Normalize community sets when exporting.
...
Set PARTIAL bits correctly.
2000-04-17 11:25:15 +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
Pavel Machek
0a40e97328
as_path_prepend is usable outside bgp.
2000-04-12 14:12:37 +00:00
Martin Mares
c2b28c9910
Real bucket lists.
2000-04-12 14:09:26 +00:00
Martin Mares
7750634946
Introduced `ARRAY_SIZE' macro to replace all the sizeof(a)/sizeof(*a) constructs.
2000-04-12 13:21:23 +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
c01e37416d
Started work on BGP. Wrote main part of the connection handling code.
2000-03-20 21:50:17 +00:00