Commit Graph

13 Commits

Author SHA1 Message Date
Denis Ovsienko
833425ab80 Babel: improve printing of time intervals
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.
2013-10-18 09:24:37 +04:00
Denis Ovsienko
39c95ea6e9 Babel: sub-TLV 2 is Diversity, not ChanInfo 2013-08-28 19:55:00 +04:00
Guy Harris
620fd514f5 Squelch a signed vs. unsigned comparison warning.
(At that point, we've already checked whether rc is < 0, so we know it's
not.)
2013-06-22 15:02:42 -07:00
Denis Ovsienko
cac189b9e3 initial support for Babel sub-TLVs decoding
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.
2013-05-29 13:03:23 +04:00
Denis Ovsienko
d0b48b5108 fix iteration over Babel Pad1 TLVs
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.
2013-05-29 13:03:23 +04:00
Guy Harris
a9845baa3d If we don't have IPv6 address support, don't try to print IPv6 addresses. 2012-12-24 03:13:23 -08:00
Denis Ovsienko
91830ddd6c update for current Babel auth spec
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.
2012-08-21 18:36:56 +04:00
Denis Ovsienko
13223554b8 update Babel decoder for DLen in HD TLV
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.
2012-06-29 22:29:04 +04:00
Denis Ovsienko
4279f79e8e fix Babel type 11 TLV length check
RFC6126 4.3. TLV Format: "If the body is longer than the expected length
of a given type of TLV, any extra data MUST be silently ignored."
2012-06-13 13:06:32 +04:00
Guy Harris
185abcdbbd Fix an error and a warning.
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).
2012-06-07 22:24:04 -07:00
Denis Ovsienko
78a8be4700 add decoding of Babel authentication TLVs
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.
2012-06-06 17:57:20 +04:00
Guy Harris
938becee00 Add length checks, use EXTRACT_16BITS().
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.
2011-12-18 16:05:05 -08:00
Juliusz Chroboczek
12b169509d Add printer for the Babel routing protocol (RFC 6126).
This version includes a couple of fixes from Wireshark.
2011-04-27 15:27:20 -04:00