0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 18:08:45 +00:00
Commit Graph

1188 Commits

Author SHA1 Message Date
Pavel Tvrdik
71f0d9e0ff Merge branch 'master' into mrtdump 2016-05-02 15:49:26 +02:00
Pavel Tvrdik
1dea356ac9 Merge branch 'master' into mrtdump 2016-05-02 15:49:23 +02:00
Ondrej Zajicek (work)
937e75d8f1 Add the Babel routing protocol (RFC 6126)
This patch implements the IPv6 subset of the Babel routing protocol.
Based on the patch from Toke Hoiland-Jorgensen, with some heavy
modifications and bugfixes.

Thanks to Toke Hoiland-Jorgensen for the original patch.
2016-04-28 18:01:40 +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 (work)
bd22d7f41d IO: Avoid multiple event cycles in one loop cycle.
Event cycle may took too much time and trigger next timer events, so
avoid cycling between timer and event cycles inside the loop cycle.
2016-04-06 11:57:28 +02:00
Ondrej Zajicek (work)
9e7b3ebdf9 IO: Replace RX priority heuristic with explicit mark
In BIRD, RX has lower priority than TX with the exception of RX from
control socket. The patch replaces heuristic based on socket type with
explicit mark and uses it for both control socket and BGP session waiting
to be established.

This should avoid an issue when during heavy load, outgoing connection
could connect (TX event), send open, but then failed to receive OPEN /
establish in time, not sending notifications between and therefore
got hold timer expired error from the neighbor immediately after it
finally established the connection.
2016-04-06 11:49:34 +02:00
Ondrej Zajicek (work)
665b8e5283 Birdlib: Do cleanups after remove/free
To avoid byzantine behavior in case of some errors, linked lists are
cleared after rem_node() and resource headers are cleared after rfree().
2016-03-23 02:21:42 +01:00
Ondrej Zajicek (work)
39a6b19d6d OSPF: Fix bogus LSA ID collisions between received and originated LSAs
After restart, LSAs locally originated by the previous instance are
received from neighbors. They are installed to LSA db and flushed. If
export of a route triggers origination of a new external LSA before flush
of the received one is complete, the check in ospf_originate_lsa() causes
origination to fail (because en->nf is NULL for the old LSA and non-NULL
for the new LSA). The patch fixes this by updating the en->nf for LSAs
being flushed (as is already done for empty ones). Generally, en->nf
field deserves some better description in the code.

Thanks to Jigar Mehta for analyzing the problem.
2016-03-23 02:21:42 +01:00
Ondrej Zajicek (work)
a459f4df16 OSPF: Fix reading from freed memory
Thanks to Pavel Tvrdik for noticing it.
2016-03-23 02:21:42 +01:00
Jan Moskyto Matejka
62a4ad3657 Merge remote-tracking branch 'origin/poll' 2016-03-22 13:23:55 +01:00
Pavel Tvrdík
9036bbf2b7 RIP: fix typo in configuration at rx length opt 2016-03-17 18:40:54 +01:00
Jan Moskyto Matejka
fd926ed4ee Poll: Prevent the improbable case of EAGAIN after POLLIN 2016-03-15 14:57:49 +01:00
Ondrej Zajicek (work)
e3f506f9b5 OSPF: Multicast ability is irrelevant for stub interfaces 2016-02-25 18:23:39 +01:00
Ondrej Zajicek (work)
487c6961cb BGP: Fix bug in incoming connection handling
When a BGP session was established by an outgoing connection with
Graceful Restart behavior negotiated, a pending incoming connection in
OpenSent state, and another incoming connection was received, then the
outgoing connection (and whole BGP session) was closed, but the old
incoming connection was just overwritten by the new one. That later
caused a crash when the hold timer from the old connection fired.
2016-02-11 16:38:28 +01:00
Pavel Tvrdík
cc4eee6297 MRT Table Dump: draft-petrie-grow-mrt-add-paths
Add support for MRT Table Dump draft-petrie-grow-mrt-add-paths
2016-01-06 14:51:52 +01:00
Pavel Tvrdík
a474f34c0b MRT Dump: Support for draft-petrie-grow-mrt-add-paths
Thanks to Colin Petrie for patch.
2016-01-06 13:52:35 +01:00
Pavel Tvrdík
bd5d7e28ab MRT Table Dump: Fix size of AS_PATH in BGP Attributes
All AS numbers in the AS_PATH attribute in RIB Entries MUST be encoded as 4-byte AS numbers.
 -- RFC 6396

Thanks to Colin Petrie for noticing us about this bug in BIRD!
2016-01-06 13:46:28 +01:00
Ondrej Zajicek (work)
52e21323b6 BGP: Update capability number from IANA for extended messages 2015-11-25 15:52:58 +01:00
Pavel Tvrdík
33b4f40acc MD5: Mormalize naming style 2015-11-24 16:01:48 +01:00
Ondrej Zajicek (work)
8eb8e546dc Merge branch 'master' into rip-new 2015-10-17 14:44:34 +02:00
Ondrej Zajicek (work)
8465dccb06 Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support
for many new features: ECMP support, link state support, BFD support,
configurable split horizon and more. Most options are now per-interface.
2015-10-05 13:18:10 +02:00
Ondrej Zajicek
b5e76398de OSPF: Fixes some issues with link detection
Thanks to Bernardo Figueiredo and Israel G. Lugo for the bugreport.
2015-08-19 11:16:23 +02:00
Pavel Tvrdík
45d8f0f0be MRT Table Dump: Skip empty RIB Tables 2015-07-28 18:18:00 +02:00
Pavel Tvrdík
018dbac0e0 Merge branch 'master' into mrtdump 2015-07-28 17:31:44 +02:00
Pavel Tvrdík
11fabd2d6b Integrate MRT Table Dump (RFC 6396) into BIRD
Asynchronous periodic mrt table dumps of routes configuration in bird.conf:
mrtdump routes {
  [ filename "<format>"; ]
  [ table <name>|"<wildcard name>"; ]
  [ period <num>; ]
  [ filter <filter>|where <condition>; ]
}

Synchronous mrt table dumps of routes in BIRD client:
mrtdump routes [table <name>|"<wildcard name>"] [to "<filename format>"] [filter <filter>|where <condition>]
2015-07-28 17:19:04 +02:00
Ondrej Zajicek
538264cf1a Static: Support for BFD controlled static routes 2015-07-24 18:02:07 +02:00
Ondrej Zajicek
1321e12ac4 Static: Allows to specify attributes for static routes
The patch adds suport for specifying route attributes together with
static routes, e.g.:

 route 10.1.1.0/24 via 10.0.0.1 { krt_advmss = 1200; ospf_metric1 = 100; };
2015-07-20 17:11:10 +02:00
Ondrej Zajicek
ffa398b8d8 BFD: Fixes crash after socket error
Thanks to Thomas King for the bugreport.
2015-07-19 11:39:24 +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
Ondrej Zajicek
d217ba5111 Moving of mulipath merging code from OSPF to nest 2015-06-08 02:24:08 +02:00
Pavel Tvrdík
ae80a2de95 unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
Pavel Tvrdík
e348ef01b4 unsgined char -> byte 2015-06-08 02:24:08 +02:00
Ondrej Filip
398f922531 Typo fix by Hans van Kranenburg 2015-06-01 10:41:17 +02:00
Pavel Tvrdík
1673814087 MD5, SHA1/256/512 libraries: fixing code style 2015-05-19 10:06:28 +02:00
Pavel Tvrdík
ddb80bd8c5 unsigned [int] -> uint 2015-05-19 08:53:34 +02:00
Pavel Tvrdík
8e8a438322 unsgined char -> byte 2015-05-19 08:14:04 +02:00
Pavel Tvrdík
00572d96f9 Merge branch 'master' into birdtest 2015-05-13 11:41:03 +02:00
Pavel Tvrdík
aa75e6dfe1 MD5: change interface of md5_final()
originally:
  void md5_final(unsigned char digest[16], struct md5_context *ctx);

newly:
  byte * md5_final(md5_context *ctx);
2015-05-13 11:18:10 +02:00
Pavel Tvrdík
1512c11ddc MD5: change naming style
MD5Init         -> md5_init
MD5Update       -> md5_update
MD5Transform    -> md5_transform
MD5Final        -> md5_final
MD5Context      -> md5_context
2015-05-13 09:32:00 +02:00
Pavel Tvrdík
a41ce27bf7 OSPF: fixing typing errors 2015-05-13 09:12:22 +02:00
Ondrej Zajicek
77edab6409 OSPF: Redesign LSA checksumming
New LSA checksumming code separates generic Fletcher-16 and OSPF-specific
code and avoids back and forth endianity conversions, making it much more
readable and also several times faster.
2015-05-01 14:40:56 +02:00
Ondrej Zajicek
dea6bb4899 OSPF: Fixes validation of LSA checksums
Prior to this patch, BIRD validates the OSPF LSA checksum by calculating
a new checksum and comparing it with the checksum in the header. Due to
the specifics of the Fletcher checksum used in OSPF, this is not
necessarily correct as the checkbytes in the header may be calculated via
a different means and end up with a different value that is nonetheless
still correct.

The documented means of validating the checksum as specified in RFC 905
B.4 is to calculate c0 and c1 from the unchanged contents of the packet,
which must result in a zero value to be considered valid.

Thanks to Chris Boot for the patch.
2015-04-29 13:43:15 +02:00
Ondrej Zajicek
30d09eb96e OSPF: Fixes validation of LSA checksums
Prior to this patch, BIRD validates the OSPF LSA checksum by calculating
a new checksum and comparing it with the checksum in the header. Due to
the specifics of the Fletcher checksum used in OSPF, this is not
necessarily correct as the checkbytes in the header may be calculated via
a different means and end up with a different value that is nonetheless
still correct.

The documented means of validating the checksum as specified in RFC 905
B.4 is to calculate c0 and c1 from the unchanged contents of the packet,
which must result in a zero value to be considered valid.

Thanks to Chris Boot for the patch.
2015-04-28 13:45:44 +02:00
Pavel Tvrdík
259e7e0f67 Merge branch 'master' into birdtest 2015-04-20 16:27:48 +02:00
Ondrej Zajicek
ef3cac669c OSPF: Fixes handling of external routes with immediate gw
The bug caused that received external LSAs with locally reachable
next hops were ignored. I wonder why nobody noticed it sooner.
2015-04-18 13:26:45 +02:00
Ondrej Zajicek
304ac2e861 Minor fixes 2015-04-12 10:47:17 +02:00
Ondrej Zajicek
d924d5a562 BGP: Fixes serious bug in TX handling
Under some circumstances and heavy load, TX could be postponed
until the session fails with hold timer expired.

Thanks to Javor Kliachev for making the bug reproductible.
2015-04-01 00:10:00 +02:00
Ondrej Zajicek
2eadd36fa0 BGP: AS-wide unique router ID (RFC 6286) support
RFC 6286 relaxed rules for router IDs, allowing EBGP sessions between
routers with the same ID (but different ASN).
2015-03-29 21:24:47 +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