]> The Tcpdump Group git mirrors - tcpdump/commit
decode RIPv2 authentication up to RFC4822
authorDenis Ovsienko <[email protected]>
Mon, 11 Jun 2012 17:06:00 +0000 (21:06 +0400)
committerDenis Ovsienko <[email protected]>
Tue, 12 Jun 2012 10:10:05 +0000 (14:10 +0400)
commit33808c66905cc32682dfb2b209d507dffa6cd8ff
tree6ccad25712873c256f108860e78ad25d06f3b256
parentc4830eb85e0eb243eb37212b254433a65333c342
decode RIPv2 authentication up to RFC4822

This change addresses a few issues in rip_entry_print_v2() and
rip_print():

1. In the case of Simple Password (RFC2453) authentication the last
(16th) character of a password was never printed. Other password
characters were printed regardless of existing isprint() test.

2. In the case of Cryptographic (RFC4822) authentication there were no
details available for fixed-size auth header and variable-size auth
trailer.

3. Depending on particular hash function used, a normal authentication
trailer "RTE" may be 20 or more bytes long. Iteration over packet RTEs
should stop once a trailer is decoded. Exact number of RTEs in a message
cannot be told from message size any more.

Test cases are added for Request and Response messages with Simple
Password, Keyed-MD5, HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384 and
HMAC-SHA-512 authentication modes. Earlier test case is updated to match
new "number of routes" output format.
print-rip.c
tests/TESTLIST
tests/ripv1v2.out
tests/ripv2_auth.out [new file with mode: 0644]
tests/ripv2_auth.pcap [new file with mode: 0644]