Changeset 661

Show
Ignore:
Timestamp:
04/05/06 17:34:32 (7 years ago)
Author:
ahu
Message:

ok - this is a scary commit. It fixes TCP packets with >16384 size offsets, which is nice, but it also removes some logic
that looks remarkably well thought out but also appeared to serve no purpose. But perhaps it was magic..

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/dnswriter.cc

    r650 r661  
    140140      goto out;                                 // skip trailing 0 in case of compression 
    141141    } 
    142     else if(compress || d_labelmap.count(chopped)) { // if 'compress' is true, li will be equal to d_labelmap.end() 
    143       d_labelmap[chopped]=pos;                       //  if untrue, we need to count  
     142     
     143    if(compress && pos < 16384) {  
     144      d_labelmap[chopped]=pos;                       //  if untrue, we need to count - also, don't store offsets > 16384, won't work 
    144145    } 
    145146    d_record.push_back((char)(i->second - i->first));