From owner-freebsd-net@FreeBSD.ORG Mon Nov 15 14:30:06 2004 Return-Path: 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 1E34416A4CE; Mon, 15 Nov 2004 14:30:06 +0000 (GMT) Received: from mxsf11.cluster1.charter.net (mxsf11.cluster1.charter.net [209.225.28.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66D6C43D49; Mon, 15 Nov 2004 14:30:05 +0000 (GMT) (envelope-from archie@dellroad.org) Received: from mxip09.cluster1.charter.net (mxip09a.cluster1.charter.net [209.225.28.139])iAFEU3iF029709; Mon, 15 Nov 2004 09:30:03 -0500 Received: from cable-68-113-94-164.mtv.al.charter.com (HELO InterJet.dellroad.org) (68.113.94.164) by mxip09.cluster1.charter.net with ESMTP; 15 Nov 2004 09:30:03 -0500 X-Ironport-AV: i="3.87,88,1099285200"; d="scan'208"; a="419375156:sNHT12725424" Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.2.2.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id IAA58236; Mon, 15 Nov 2004 08:17:42 -0600 (CST) Received: from arch20m.dellroad.org (localhost [127.0.0.1]) iAFEHg6t015172; Mon, 15 Nov 2004 08:17:42 -0600 (CST) (envelope-from archie@arch20m.dellroad.org) Received: (from archie@localhost) by arch20m.dellroad.org (8.12.9p2/8.12.9/Submit) id iAFEHfhN015171; Mon, 15 Nov 2004 08:17:42 -0600 (CST) (envelope-from archie) From: Archie Cobbs Message-Id: <200411151417.iAFEHfhN015171@arch20m.dellroad.org> In-Reply-To: <20041115104331.GA93477@cell.sick.ru> To: Gleb Smirnoff Date: Mon, 15 Nov 2004 08:17:41 -0600 (CST) X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: maxim@freebsd.org cc: rwatson@freebsd.org cc: net@freebsd.org Subject: Re: divert(4) socket isn't connection oriented X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 14:30:06 -0000 Gleb Smirnoff wrote: > Since it is working, it was not noticed quickly. Real problems occur when > a multicast packet comes on interface: it is diverted to ng_ksocket, returned > and div_output() sends it to ip_output(). In ip_output() it is ip_mloopback()ed > and if_simloop()ed. A copy of packet enters divert socket, duplicated... a > forever loop and total freeze. Your fix makes sense, but is it more of a workaround than a proper fix? It seems like the real bug is that divert is promising to write the packet as "outgoing" yet the packet loops back as "incoming". Maybe it would make more sense to attach a tag to the packet that divert would recognize and know to ignore the extra incoming packet. Also, does the same thing happen with broadcast packets? -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com