From owner-freebsd-net Sat Sep 14 15: 0: 7 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F31E37B401 for ; Sat, 14 Sep 2002 15:00:06 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6CB443E6E for ; Sat, 14 Sep 2002 15:00:05 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id OAA92992; Sat, 14 Sep 2002 14:51:23 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g8ELoP207460; Sat, 14 Sep 2002 14:50:25 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200209142150.g8ELoP207460@arch20m.dellroad.org> Subject: Re: ip_output() problem with a large packets and IP_OPTIONS In-Reply-To: <20020913194115.F94274-100000@news1.macomnet.ru> "from Maxim Konovalov at Sep 13, 2002 08:03:14 pm" To: Maxim Konovalov Date: Sat, 14 Sep 2002 14:50:25 -0700 (PDT) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Maxim Konovalov writes: > There is a problem when there is no room for ip options and > ip_insertoptions() fails. ip_output() does not initialize len and > doesn't check what ip_insertoptions() returns. This behaviour leads to > a panic when you are trying to send 65507 bytes packet and > setsockopt(IP_OPTIONS). Please review a patch below: It's definitely broken the way it is and your patch seems to fix it. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message