0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-11 17:08:46 +00:00
Eric Long 072821e55e Flowspec: Fix IPv6 prefix when offset is not multiple of 8
Current implementation handles flowspec prefix length and offset only
in bytes, but RFC 8956 (Dissemination of Flow Specification Rules for
IPv6) Section 3.1 [1] and example in Section 3.8.2 [2] states the
pattern should begin right after offset *bits*.

For example, pattern "::1:1234:5678:9800:0/60-104" is currently
serialized as "02 68 3c 01 12 34 56 78 98", but it should shift its
pattern 4 more bits to the left: "02 68 3c 11 23 45 67 89 80".

This patch implements shifting left/right for IPv6 type and use it to
correct the behaviour. Test data are replaced with the correct ones.

Minor changes and test vectors done by committer.

[1]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.1
[2]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.8.2
2024-10-16 21:32:36 +02:00
..
2017-02-20 02:26:45 +01:00
2024-05-30 02:11:06 +02:00
2015-11-05 12:48:52 +01:00
2015-06-08 02:24:08 +02:00
2015-06-08 02:24:08 +02:00
2021-03-12 15:35:56 +01:00
2015-05-01 14:40:56 +02:00
2023-09-26 15:46:24 +02:00
2013-09-16 23:57:40 +02:00
2016-11-08 19:27:58 +01:00
2022-03-02 12:13:49 +01:00
2022-03-14 17:37:56 +01:00
2023-04-20 19:33:00 +02:00
2024-05-29 13:03:10 +02:00
2015-11-24 13:52:26 +01:00
2022-04-06 18:14:08 +02:00
2016-11-09 16:36:34 +01:00
2014-06-26 11:58:57 +02:00
2024-05-29 13:03:10 +02:00
2017-12-07 13:53:42 +01:00
2024-08-27 14:28:41 +02:00
2024-08-27 14:28:41 +02:00
2024-06-27 04:14:38 +02:00
2018-11-20 17:45:35 +01:00
2015-06-08 02:24:08 +02:00