From owner-freebsd-net@freebsd.org Wed Jun 24 08:22:54 2015 Return-Path: Delivered-To: freebsd-net@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 2FC6D915BCD for ; Wed, 24 Jun 2015 08:22:54 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id EBB5F1DA2 for ; Wed, 24 Jun 2015 08:22:53 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id F094727058D4 for ; Wed, 24 Jun 2015 10:22:45 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id C544227056AE for ; Wed, 24 Jun 2015 10:22:45 +0200 (CEST) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qfUpkdEk8JvN for ; Wed, 24 Jun 2015 10:22:45 +0200 (CEST) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 984C627003EE for ; Wed, 24 Jun 2015 10:22:45 +0200 (CEST) Date: Wed, 24 Jun 2015 10:22:45 +0200 (CEST) From: Emeric POUPON To: freebsd-net@freebsd.org Message-ID: <1192147789.4088965.1435134165130.JavaMail.zimbra@stormshield.eu> In-Reply-To: <1675689431.4082440.1435132697610.JavaMail.zimbra@stormshield.eu> Subject: Multicast routing questions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thread-Topic: Multicast routing questions Thread-Index: Vsd+/2S3+S438okLmXtp7ycRtQqEwA== X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2015 08:22:54 -0000 Hello, I'm testing multicast routing on FreeBSD 9.3 and I have a question: In packet reception, it seems the packet is received locally as many times the packet is rerouted + 1: ip_input -> ip_mforward -> ip_output (as many times there are dst interfaces in the route cache entry) -> ip_mloopback -> if_simloop (rcvif becomes the ifp of the output interface) -> ip_input -> ip_mforward -> ... In ip_input, after each ip_mforward call, the packet is processed locally (using the goto "ours:") Futhermore it seems this infinite loop is actually broken thanks to a test in ip_mforward that checks the ifp is the same as the registered one in the cache entry. Maybe I missed something, but it does not seem to be working as expected. What do you think? Emeric