From owner-freebsd-ipfw@FreeBSD.ORG  Mon Feb 23 09:56:57 2004
Return-Path: <owner-freebsd-ipfw@FreeBSD.ORG>
Delivered-To: freebsd-ipfw@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 9238B16A4CE; Mon, 23 Feb 2004 09:56:57 -0800 (PST)
Received: from mail.alkar.net (mail.alkar.net [195.248.191.95])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id A1A4E43D1D; Mon, 23 Feb 2004 09:56:56 -0800 (PST)
	(envelope-from mav@alkar.net)
Received: from [195.248.178.122] (HELO alkar.net)
  by mail.alkar.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 148536741; Mon, 23 Feb 2004 19:56:55 +0200
Message-ID: <403A3EE8.2000302@alkar.net>
Date: Mon, 23 Feb 2004 19:56:56 +0200
From: Alexander Motin <mav@alkar.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5b) Gecko/20030827
X-Accept-Language: ru, uk, en-us, en
MIME-Version: 1.0
To: Max Laier <max@love2party.net>
References: <c0soic$1njq$2@pandora.alkar.net.lucky.freebsd.net>
	<c1d9id$10qf$1@pandora.alkar.net> <200402231807.29317.max@love2party.net>
In-Reply-To: <200402231807.29317.max@love2party.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: freebsd-net@freebsd.org
cc: freebsd-ipfw@freebsd.org
Subject: Re: Generating 'Fragment Needed but DF was Set' ICMP & Dummynet
X-BeenThere: freebsd-ipfw@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: IPFW Technical Discussions <freebsd-ipfw.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw>,
	<mailto:freebsd-ipfw-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ipfw>
List-Post: <mailto:freebsd-ipfw@freebsd.org>
List-Help: <mailto:freebsd-ipfw-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw>,
	<mailto:freebsd-ipfw-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Feb 2004 17:56:57 -0000

Max Laier wrote:
> On Monday 23 February 2004 17:25, Alexander Motin wrote:
> 
>>Here are my patches for this problem for FreeBSD 4.8 and 5.2.
>>Review them please.
> 
> 
> Looks good, though you might want to make sure to update statistics 
> (ipstat.ips_cantfrag++). 
It is already incremented inside ip_output().

> And maybe lose the type and code vars - you 
> don't really use them:
> -                       type = ICMP_UNREACH;
> -                       code = ICMP_UNREACH_HOST;
> -                       icmp_error(mcopy, type, code, 0, pkt->ifp);
> +			icmp_error(mcopy, ICMP_UNREACH, ICMP_UNREACH_HOST,
> +			    0, pkt->ifp);
Of course. As you wish. :)

> Also note that this patch will require some work after the MT_TAG remove 
> http://people.freebsd.org/~mlaier/mt_tag_remove.diff as pkt is freed with 
> the mbuf. I'll keep it in mind.
Yes, but this was only the sample to highlight the problem. :) There 
also some part of code from ip_forward() about IPSEC MTU can be duplicated.

-- 
Alexander Motin mav@alkar.net
ISP "Alkar-Teleport"