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

2809 Commits

Author SHA1 Message Date
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
5aa9ab0cfd SHA & MD5 libs: changing headers 2015-05-13 09:27:44 +02:00
Pavel Tvrdík
a41ce27bf7 OSPF: fixing typing errors 2015-05-13 09:12:22 +02:00
Ondrej Zajicek
9fdf9d29b6 KRT: Add support for plenty of kernel route metrics
Linux kernel route metrics (RTA_METRICS netlink route attribute) are
represented and accessible as new route attributes:

krt_mtu, krt_window, krt_rtt, krt_rttvar, krt_sstresh, krt_cwnd, krt_advmss,
krt_reordering, krt_hoplimit, krt_initcwnd, krt_rto_min, krt_initrwnd,
krt_quickack, krt_lock_mtu, krt_lock_window, krt_lock_rtt, krt_lock_rttvar,
krt_lock_sstresh, krt_lock_cwnd, krt_lock_advmss, krt_lock_reordering,
krt_lock_hoplimit, krt_lock_rto_min, krt_feature_ecn, krt_feature_allfrag
2015-05-12 16:42:22 +02:00
Pavel Tvrdík
d16b33f556 SHA512: Fixing bug in SHA512 & SHA384
SHA512/SHA384 are using the SHA256 update and differs in the transform function.
This adds a pointer to transform function into a SHA context.
2015-05-12 12:46:26 +02:00
Pavel Tvrdík
5a12cc27f7 SHA512: small changes in code style 2015-05-12 12:46:26 +02:00
Pavel Tvrdík
a777dff865 SHA512 Tests: Fixing the expected hashes 2015-05-12 12:46:26 +02:00
Pavel Tvrdík
9f2c0ca0ef SHA Tests: Use a longer (160-length) string 2015-05-12 12:46:11 +02:00
Pavel Tvrdík
5beaaa3d6b SHA: only renamed hd -> ctx 2015-05-12 12:24:28 +02:00
Ondrej Zajicek
315f23a047 Add bitfield route attribute type 2015-05-10 19:44:10 +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
Pavel Tvrdík
f84f925036 Birdtest: add IPv6 unit test for convert '::' 2015-04-29 16:50:38 +02:00
Pavel Tvrdík
71adc0f9e2 Add HMAC-SHA384 and HMAC-SHA512 (both not work!) 2015-04-29 16:50:38 +02:00
Pavel Tvrdík
e7ac4efd54 HMAC-SHA256, HMAC-SHA224 according to HMAC-SHA1
Successfully passed unit tests.
2015-04-29 16:49:44 +02:00
Pavel Tvrdík
b813656c58 SHA: Fixing broken build process 2015-04-29 13:43:15 +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
893ab8272b KRT: Fixes route reload
Did not really worked
2015-04-29 13:43:15 +02:00
Ondrej Zajicek
8d03327b42 KRT: Fixes learning of preferred kernel routes.
When a new route was imported from kernel and chosen as preferred, then
the old best route was propagated as a withdraw to the kernel protocol.
Under some circumstances such withdraw propagated to the BSD kernel could
remove the new alien route and thus reverting the import.
2015-04-29 13:43:15 +02:00
Ondrej Zajicek
71e24a33b8 KRT: Support for RTM_CHANGE on BSD 2015-04-29 13:43:15 +02:00
Pavel Tvrdík
5355407915 Add SHA512 and SHA384 hash library and unit tests 2015-04-28 17:05:29 +02:00
Pavel Tvrdík
5a5e825213 Birdtest: small change
The number of build-failure tests must be equal to zero or upper
2015-04-28 17:02:42 +02:00
Pavel Tvrdík
ac2dc0510f Add HMAC-SHA224 (but it does not work yet!)
Unit Tests for HMAC-SHA224 not passed
2015-04-28 17:02:28 +02:00
Pavel Tvrdík
e4e80e4f8f SHA256: Integrate sha256_hmac into sha256 2015-04-28 16:58:44 +02:00
Pavel Tvrdík
6d3c17d5c2 SHA1: Integrate sha1_hmac.c into sha1.c 2015-04-28 16:58:44 +02:00
Pavel Tvrdík
17a0035a1c SHA: Fixing small bugs and code style
Thanks to Ondrej Zajicek
2015-04-28 16:58:31 +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
Ondrej Zajicek
7069fc9e72 KRT: Fixes route reload
Did not really worked
2015-04-25 21:41:43 +02:00
Ondrej Zajicek
c5ff44a703 KRT: Fixes learning of preferred kernel routes.
When a new route was imported from kernel and chosen as preferred, then
the old best route was propagated as a withdraw to the kernel protocol.
Under some circumstances such withdraw propagated to the BSD kernel could
remove the new alien route and thus reverting the import.
2015-04-25 20:43:43 +02:00
Pavel Tvrdík
c23cd84ed5 Add HMAC-SHA256 hash library and unit tests 2015-04-25 13:43:49 +02:00
Pavel Tvrdík
26b1fd1dc4 Add SHA256, SHA224 hash libraries and unit tests 2015-04-23 15:19:36 +02:00
Pavel Tvrdík
16e4e98ea0 SHA1: Code formatting 2015-04-23 15:19:26 +02:00
Pavel Tvrdík
5015dceee0 SHA1: Remove original libucw unit tests 2015-04-23 15:19:26 +02:00
Pavel Tvrdík
24ff638db2 SHA1: Use get_u32 and put_u32 2015-04-23 11:27:36 +02:00
Pavel Tvrdík
dd78aae55c SHA-1: safer endianity 2015-04-22 17:45:14 +02:00
Pavel Tvrdík
57453a3c5f Fixing copyrights at SHA-1 and HMAC-SHA1 libraries 2015-04-22 12:12:05 +02:00
Pavel Tvrdík
828e091013 Add SHA-1 and HMAC-SHA1 libraries with unit tests
Refactore MD5 tests
2015-04-22 11:15:38 +02:00
Ondrej Zajicek
90097f4fb9 KRT: Support for RTM_CHANGE on BSD 2015-04-22 10:53:15 +02:00
Pavel Tvrdík
5245c4dd6d Birdtest: add io_log_event() mockup 2015-04-20 16:50:51 +02:00
Pavel Tvrdík
259e7e0f67 Merge branch 'master' into birdtest 2015-04-20 16:27:48 +02:00
Pavel Tvrdík
a22d36256e Birdtest: Refactore functions (only rename) 2015-04-20 13:50:33 +02:00
Ondrej Zajicek
deec752ef9 NEWS and version update 2015-04-20 12:27:00 +02:00
Ondrej Zajicek
b867a87c2f Fixes port range socket option 2015-04-19 00:31:59 +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
Pavel Tvrdík
5419d2a3c5 Birdtest: Compability bug fixes
Tested on Ubuntu & FreeBSD & NetBSD & OpenBSD
2015-04-15 15:42:43 +02:00
Pavel Tvrdík
2bb3d343e9 Add .gitignore 2015-04-15 12:16:42 +02:00
Pavel Tvrdík
60c2d0c39f Birdtest: Add tests suites for SLIST datastructure 2015-04-15 12:14:36 +02:00
Pavel Tvrdík
979dc9e65e Birdtest: Refactore some tests
lib/bitops_test.c
lib/ip_test.c
lib/lists_test.c
lib/md5_test.c
2015-04-15 12:11:50 +02:00
Pavel Tvrdík
81b2e266fb Birdtest: Build system: improve dependencies
while a some source file is changed, the test suite will recompile
2015-04-15 12:07:10 +02:00
Pavel Tvrdík
1ce8d33b80 Birdtest: Improve the testing framework
- non-blocking asserts, only set bt_test_suite_success
- unification of testing output from bt_assert_fn_in_out and bt_assert_out_fn_in
2015-04-15 11:51:24 +02:00
Pavel Tvrdík
84dbe05f93 Birdtest: Extend IP addr funcs Tests 2015-04-13 10:59:20 +02:00