During the work on the decoder I spotted another potential issue. RFC6126
defines address encoding 3 as follows:
o AE 3: link-local IPv6 address. The value is 8 octets long, a
prefix of fe80::/64 is implied.
The actual code in network_prefix() looks different, in that less than 8 octets
of encoding would suffice for prefixes /120 and shorter (as with AE 1 and AE 2):
case 3:
if(pb > 8 && len < pb - 8) return -1;
prefix[0] = 0xfe;
prefix[1] = 0x80;
if(pb > 8) {
memcpy(prefix + 8, p, pb - 8);
consumed = pb - 8;
}
break;
This is not tcpdump-specific, the babeld code implements it the same way.
Somebody please proofread these findings.
--
Denis Ovsienko
_______________________________________________
Babel-users mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users