All Babel intervals are encoded in centiseconds and must not be 0. In an
Update TLV the interval value 0xFFFF means infinity (RFC6126 Section
4.4.9). Update the test cases.
Babel sub-TLVs are a work in progress, a backward-compatible extension
to Babel version 2 protocol encoding. This update implements encoding
explained by Juliusz Chroboczek to decode ChanInfo sub-TLV of the Update
TLV.
The Pad1 TLV consists only of the Type field (RFC6126 Section 4.4.1),
thus the check for Pad1 type must be done before the Length field is
consumed, if ever. This change brings tcpdump decoder into line with the
spec and Babel implementation's own TLV iterator.
This change updates Babel decoder output format to match terminology of
draft-ovsienko-babel-hmac-authentication-00 and reverts recent addition
of DLen field to TLV type 12.
This change reflects a new Digest Length field added to Hash Digest TLV
in the current draft of Babel authentication spec. babel_print_v2() is
updated to fetch and validate the new field. Test files too.
Use a separate variable to index through the hash digest, not the
variable used to index through the packet.
Make some variables holding one-byte quantities u_int rather than u_char
while we're at it - not much use in *requiring* them to fit into 8 bits
(the code might be better if we don't, and that eliminates a warning).
This change extends existing Babel protocol decoder to recognise
experimental authentication TLVs (types 11 and 12) and includes
a respective test case for the new code.
Use EXTRACT_16BITS() rather than a hand-rolled macro to extract
big-endian 16-bit quantities from the packet.
When processing the message, check against the body length *and* the UDP
payload length, as well as against the raw frame length.