From owner-freebsd-net@FreeBSD.ORG Mon Aug 7 14:46:54 2006 Return-Path: X-Original-To: net@FreeBSD.org 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 2378416A4DD for ; Mon, 7 Aug 2006 14:46:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5701E43D62 for ; Mon, 7 Aug 2006 14:46:01 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k77Ejwbm055599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Aug 2006 18:45:58 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k77Ejvkc055598; Mon, 7 Aug 2006 18:45:58 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 7 Aug 2006 18:45:57 +0400 From: Gleb Smirnoff To: Luigi Rizzo Message-ID: <20060807144557.GF96644@cell.sick.ru> References: <20060726071232.A96367@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20060726071232.A96367@xorpc.icir.org> User-Agent: Mutt/1.5.6i Cc: net@FreeBSD.org Subject: Re: multiple DSL modems and pppoe sessions on the same ethernet ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Aug 2006 14:46:54 -0000 On Wed, Jul 26, 2006 at 07:12:32AM -0700, Luigi Rizzo wrote: L> The problem is, my provider does not provide specific service names, L> but it will accept anything i supply. So when i run the three ppp instances, L> they will all match, and the code in ng_pppoe.c will happily take the L> first reply as good. L> L> The only approach left is then implement some form of MAC filtering, L> e.g. overloading the 'service name' to specify the mac address of the L> modem i am interested in. L> There is a couple of ways to implement this, one is patching the L> receive path (ng_pppoe_rcvdata(), case PADO_CODE) to filter replies L> based on the source mac address, and the other one is to patch L> the code transmitting the PADI packet to replace the broadcast L> dst address with the unicast MAC taken from the "service name". The second option I think is a violation of the protocol, so I suppose filtering on receive path is better. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE