ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vpn_dns.C
(Generate patch)

Comparing gvpe/src/vpn_dns.C (file contents):
Revision 1.53 by root, Tue Oct 18 10:54:17 2011 UTC vs.
Revision 1.55 by root, Tue Oct 18 11:11:32 2011 UTC

401{ 401{
402 unsigned int len; 402 unsigned int len;
403 403
404 for (;;) 404 for (;;)
405 { 405 {
406 if (fill < 2)
407 return 0;
408
406 len = (data [0] << 8) | data [1]; 409 len = (data [0] << 8) | data [1];
407 410
408 if (len <= MAXSIZE || fill < 2) 411 if (len <= MAXSIZE)
409 break; 412 break;
410 413
411 // TODO: handle this better than skipping, e.g. by reset 414 // TODO: handle this better than skipping, e.g. by reset
412 slog (L_DEBUG, _("DNS: corrupted packet stream skipping a byte...")); 415 slog (L_DEBUG, _("DNS: corrupted packet (%02x %02x) stream skipping a byte..."), data [0], data [1]);
413 remove (1); 416 remove (1);
414 } 417 }
415 418
416 if (fill < len + 2) 419 if (fill < len + 2)
417 return 0; 420 return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines