svn commit: r192848 - head/sys/netinet
John Baldwin
jhb at FreeBSD.org
Tue May 26 20:00:31 UTC 2009
Author: jhb
Date: Tue May 26 20:00:30 2009
New Revision: 192848
URL: http://svn.freebsd.org/changeset/base/192848
Log:
Correct the sense of a test so that this filter always waits for the full
request to arrive. Previously it would end up returning as soon as the
request length stored in the first two bytes had arrived.
Reviewed by: dwmalone
MFC after: 1 week
Modified:
head/sys/netinet/accf_dns.c
Modified: head/sys/netinet/accf_dns.c
==============================================================================
--- head/sys/netinet/accf_dns.c Tue May 26 19:39:09 2009 (r192847)
+++ head/sys/netinet/accf_dns.c Tue May 26 20:00:30 2009 (r192848)
@@ -78,7 +78,7 @@ sohasdns(struct socket *so, void *arg, i
if (sb->sb_cc >= sb->sb_hiwat || sb->sb_mbcnt >= sb->sb_mbmax)
goto ready;
- /* Check and see if we have a request. */
+ /* Check to see if we have a request. */
if (skippacket(sb) == DNS_WAIT)
return;
@@ -128,7 +128,7 @@ skippacket(struct sockbuf *sb) {
q.len = sb->sb_cc;
GET16(p, packlen);
- if (packlen + 2 < q.len)
+ if (packlen + 2 > q.len)
return DNS_WAIT;
return DNS_OK;
More information about the svn-src-head
mailing list