summaryrefslogtreecommitdiff
path: root/proto/babel/babel.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-06-06 15:22:59 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-06-06 16:28:18 +0200
commitb174cc0abc0a9d7e84cc6fae46d9e19b714fbcfb (patch)
tree8bb6d9099e7139a38634e230b8d7ec003cba298d /proto/babel/babel.h
parentb218a28f61e1e9a93c3a4f2e180590f85df62e79 (diff)
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
Diffstat (limited to 'proto/babel/babel.h')
-rw-r--r--proto/babel/babel.h7
1 files changed, 4 insertions, 3 deletions
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
};