From owner-svn-src-head@FreeBSD.ORG Tue May 26 20:00:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F9F41065675; Tue, 26 May 2009 20:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED7F8FC16; Tue, 26 May 2009 20:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4QK0UI7071958; Tue, 26 May 2009 20:00:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4QK0UVx071957; Tue, 26 May 2009 20:00:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905262000.n4QK0UVx071957@svn.freebsd.org> From: John Baldwin Date: Tue, 26 May 2009 20:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192848 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 20:00:31 -0000 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;