From owner-svn-src-all@freebsd.org Wed Oct 18 08:06:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94E9FE2FB21; Wed, 18 Oct 2017 08:06:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 613846F999; Wed, 18 Oct 2017 08:06:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9I865dO018396; Wed, 18 Oct 2017 08:06:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9I865fH018395; Wed, 18 Oct 2017 08:06:05 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201710180806.v9I865fH018395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 18 Oct 2017 08:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324719 - head/sys/boot/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/libsa X-SVN-Commit-Revision: 324719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 08:06:06 -0000 Author: tsoome Date: Wed Oct 18 08:06:05 2017 New Revision: 324719 URL: https://svnweb.freebsd.org/changeset/base/324719 Log: libsa/ip: stop read loop on bad fragments Lets try to clear out from case of overlapping etc fragments and stop read. Reported by: Dan McDonald Modified: head/sys/boot/libsa/ip.c Modified: head/sys/boot/libsa/ip.c ============================================================================== --- head/sys/boot/libsa/ip.c Wed Oct 18 08:05:46 2017 (r324718) +++ head/sys/boot/libsa/ip.c Wed Oct 18 08:06:05 2017 (r324719) @@ -350,7 +350,8 @@ readipv4(struct iodesc *d, void **pkt, void **payload, last = NULL; STAILQ_FOREACH(ipq, &ipr->ip_queue, ipq_next) { if ((ntohs(ipq->ipq_hdr->ip_off) & IP_OFFMASK) != n / 8) { - errno = EAGAIN; + STAILQ_REMOVE(&ire_list, ipr, ip_reasm, ip_next); + ip_reasm_free(ipr); return (-1); }