From b174cc0abc0a9d7e84cc6fae46d9e19b714fbcfb Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sun, 6 Jun 2021 15:22:59 +0200 Subject: [PATCH] Babel: Add MAC authentication support - update Some cleanups and bugfixes to the previous patch, including: - Fix rate limiting in index mismatch check - Fix missing BABEL_AUTH_INDEX_LEN in auth_tx_overhead computation - Fix missing auth_tx_overhead recalculation during reconfiguration - Fix pseudoheader construction in babel_auth_sign() (sport vs fport) - Fix typecasts for ptrdiffs in log messages - Make auth log messages similar to corresponding RIP/OSPF ones - Change auth log messages for events that happen during regular operation to debug messages - Switch meaning of babel_auth_check*() functions for consistency with corresponding RIP/OSPF ones - Remove requirement for min/max key length, only those required by given MAC code are enforced --- doc/bird.sgml | 9 +- proto/babel/babel.c | 104 ++++++++++------- proto/babel/babel.h | 7 +- proto/babel/config.Y | 22 ++-- proto/babel/packets.c | 261 ++++++++++++++++++++---------------------- 5 files changed, 205 insertions(+), 198 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 8235740e..15085874 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1827,8 +1827,8 @@ protocol babel [] { accept to "<date>"; from "<date>"; to "<date>"; - algorithm ( hmac sha1 | hmac sha256 | hmac sha384 | hmac - sha512 | blake2s | blake2b ); + algorithm ( hmac sha1 | hmac sha256 | hmac sha384 | + hmac sha512 | blake2s128 | blake2s256 | blake2b256 | blake2b512 ); }; }; } @@ -1932,13 +1932,12 @@ protocol babel [] { authentication is selected, a key must be specified with the