View | Details | Raw Unified | Return to bug 208725 | Differences between
and this patch

Collapse All | Expand All

(-)pdns/dnspacket.cc (-3 / +3 lines)
Lines 641-649 bool checkForCorrectTSIG(const DNSPacket Link Here
641
  string message;
641
  string message;
642
642
643
  q->getTSIGDetails(trc, keyname, &message);
643
  q->getTSIGDetails(trc, keyname, &message);
644
  uint64_t now = time(0);
644
  uint64_t delta = std::abs((int64_t)trc->d_time - (int64_t)time(0));
645
  if(abs(trc->d_time - now) > trc->d_fudge) {
645
  if(delta > trc->d_fudge) {
646
    L<<Logger::Error<<"Packet for '"<<q->qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< abs(trc->d_time - now)<<" > 'fudge' "<<trc->d_fudge<<endl;
646
    L<<Logger::Error<<"Packet for '"<<q->qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< delta <<" > 'fudge' "<<trc->d_fudge<<endl;
647
    return false;
647
    return false;
648
  }
648
  }
649
649

Return to bug 208725