From owner-cvs-all@FreeBSD.ORG Fri Sep 29 03:07:43 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58D5616A403; Fri, 29 Sep 2006 03:07:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D4CE43D45; Fri, 29 Sep 2006 03:07:43 +0000 (GMT) (envelope-from brooks@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8T37hon001568; Fri, 29 Sep 2006 03:07:43 GMT (envelope-from brooks@repoman.freebsd.org) Received: (from brooks@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8T37g6s001567; Fri, 29 Sep 2006 03:07:42 GMT (envelope-from brooks) Message-Id: <200609290307.k8T37g6s001567@repoman.freebsd.org> From: Brooks Davis Date: Fri, 29 Sep 2006 03:07:41 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sbin/dhclient bpf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2006 03:07:43 -0000 brooks 2006-09-29 03:07:41 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sbin/dhclient bpf.c Log: MFC rev 1.7 It is possible for bpf to return a length such that: length != BPF_WORDALIGN(length) This meeans that it is possible for this to be true: interface->rbuf_offset > interface->rbuf_len Handle this case in the test for running out of packets. While OpenBSD's solution of setting interface->rbuf_len to BPF_WORDALIGN(length) is safe due to the size of the buffer, I think this solution results in less hidden assumptions. This should fix the problem of dhclient running away and consuming 100% CPU. PR: bin/102226 Submitted by: Joost Bekkers Approved by: re (ken) Revision Changes Path 1.2.2.4 +1 -1 src/sbin/dhclient/bpf.c