From b174cc0abc0a9d7e84cc6fae46d9e19b714fbcfb Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sun, 6 Jun 2021 15:22:59 +0200 Subject: 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 --- proto/babel/babel.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'proto/babel/babel.h') diff --git a/proto/babel/babel.h b/proto/babel/babel.h index ef5b4a5d..1e946f19 100644 --- a/proto/babel/babel.h +++ b/proto/babel/babel.h @@ -61,8 +61,9 @@ #define BABEL_OVERHEAD (IP6_HEADER_LENGTH+UDP_HEADER_LENGTH) #define BABEL_MIN_MTU (512 + BABEL_OVERHEAD) -#define BABEL_AUTH_NONE 0 +#define BABEL_AUTH_NONE 0 #define BABEL_AUTH_MAC 1 + #define BABEL_AUTH_NONCE_LEN 10 /* we send 80 bit nonces */ #define BABEL_AUTH_MAX_NONCE_LEN 192 /* max allowed by spec */ #define BABEL_AUTH_INDEX_LEN 32 /* max size in spec */ @@ -82,9 +83,9 @@ enum babel_tlv_type { BABEL_TLV_UPDATE = 8, BABEL_TLV_ROUTE_REQUEST = 9, BABEL_TLV_SEQNO_REQUEST = 10, - BABEL_TLV_MAC = 16, + BABEL_TLV_MAC = 16, BABEL_TLV_PC = 17, - BABEL_TLV_CHALLENGE_REQ = 18, + BABEL_TLV_CHALLENGE_REQUEST = 18, BABEL_TLV_CHALLENGE_REPLY = 19, BABEL_TLV_MAX }; -- cgit v1.2.3