From owner-svn-src-head@freebsd.org Mon Sep 26 13:29:01 2016 Return-Path: Delivered-To: svn-src-head@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 872C2BE83AE; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E7F7DCC; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x22f.google.com with SMTP id 38so80729683qte.1; Mon, 26 Sep 2016 06:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=h4E1zmWLr0ErOHUTkAV4No+ftbLWN25ujQeFfLNv5g1O8cIr0nhPko+wOUez6q2Ic8 nr+kh/uNRDapQUFaTrWBrKxhtPVR31dP+kG1EjA80tmRLnhebTBZQPXHqDxNgiZDdigo NW/GiJHxKZG+ReuRLIKBJQRJyFKOtZ5w9d7A8m3B9MQiMbPvNbRf442CBeAi8uuHpJfD T4/M3XbIkeb9pnR5vdQZ07Nq51JEHVQVG0LvHEMzYMo4rahrj+xaISQOGYRdOMCYUHZc 4bIe01JEKi1iaBjef1mUYxMG8YkijBjfywmGmuGNhsEFjHq7RNngwX3hXTOVGO5HosCh /CUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=fK0bW3IPsv59dRjmwNv/1KzDW0gHC8FWFI5fqrgJpOPag9io4BB2iOHPH9dHxSOO6e GUEun7xrIDXxi9hXMLLCtH0/ZLoAppKG/6gQenSimoREI6mkXdqp8TGdZkqRQQDXZvYx Nm8G+z92Gl33k4/lJW+mYvb7Gj7wcT87jBqGy9H2BePlwyVZSReu5XgR6lK2jp7v/jJN kpKC9e39uDwYl6t2g/BNn3/PxjVFvOWeSOeLYmroUeHhKGjVau2mm5RDEGtChJAqVKST m8ckb5mYoVHGbxNjpVyJDB1YfVcyGm9L1fvT5WAzMf0QmAmzwNOr+EfjDop7GRUP8N5x nLPg== X-Gm-Message-State: AA6/9RmyyyoqPyaiXkbg0J4+d4UlqkbSQMEfbLCDWEgnjmRr+7+FMGL5m4zNOir8ECJsNA== X-Received: by 10.200.51.54 with SMTP id t51mr20638458qta.110.1474896540002; Mon, 26 Sep 2016 06:29:00 -0700 (PDT) Received: from mbp-eth.home (179-125-152-136.desktop.com.br. [179.125.152.136]) by smtp.gmail.com with ESMTPSA id r187sm11544461qkc.49.2016.09.26.06.28.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 06:28:59 -0700 (PDT) Sender: Renato Botelho From: Renato Botelho Message-Id: <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r306289 - head/sys/net Date: Mon, 26 Sep 2016 10:28:54 -0300 In-Reply-To: <201609240709.u8O79hue048932@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Kristof Provost References: <201609240709.u8O79hue048932@repo.freebsd.org> X-Mailer: Apple Mail (2.3226) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 26 Sep 2016 13:29:01 -0000 > On 24 Sep 2016, at 04:09, Kristof Provost wrote: >=20 > Author: kp > Date: Sat Sep 24 07:09:43 2016 > New Revision: 306289 > URL: https://svnweb.freebsd.org/changeset/base/306289 >=20 > Log: > bridge: Fix fragment handling and memory leak >=20 > Fragmented UDP and ICMP packets were corrupted if a firewall with = reassembling > feature (like pf'scrub) is enabled on the bridge. This patch fixes = corrupted > packet problem and the panic (triggered easly with low RAM) as = explain in PR > 185633. >=20 > bridge_pfil and bridge_fragment relationship: >=20 > bridge_pfil() receive (IN direction) packets and sent it to the = firewall The > firewall can be configured for reassembling fragmented packet (like = pf'scrubing) > in one mbuf chain when bridge_pfil() need to send this reassembled = packet to the > outgoing interface, it needs to re-fragment it by using = bridge_fragment() > bridge_fragment() had to split this mbuf (using ip_fragment) first = then > had to M_PREPEND each packet in the mbuf chain for adding Ethernet > header. >=20 > But M_PREPEND can sometime create a new mbuf on the begining of the = mbuf chain, > then the "main" pointer of this mbuf chain should be updated and this = case is > tottaly forgotten. The original bridge_fragment code (Revision = 158140, > 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was > embedded. But on FreeBSD, bridge_enqueue() is done after = bridge_fragment(), > then the original OpenBSD code can't work as-it of FreeBSD. >=20 > PR: 185633 > Submitted by: Olivier Cochard-Labb=C3=A9 > Differential Revision: https://reviews.freebsd.org/D7780 Kristof, Do you hace plans to MFC it to stable/11 and stable/10? -- Renato Botelho