[Babel-users] AE 3 spec versus implementation
    Denis Ovsienko 
    infrastation at yandex.ru
       
    Fri May 10 14:47:38 UTC 2013
    
    
  
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
    
    
More information about the Babel-users
mailing list