From owner-freebsd-arch@FreeBSD.ORG Wed Apr 7 10:53:38 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DB3B16A4CE; Wed, 7 Apr 2004 10:53:38 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B56443D5A; Wed, 7 Apr 2004 10:53:38 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i37HqHPq030602; Wed, 7 Apr 2004 13:52:17 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i37HqHcF030597; Wed, 7 Apr 2004 13:52:17 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 7 Apr 2004 13:52:17 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: harti@freebsd.org In-Reply-To: <20040407111613.W759@130-149-145-115.dialup.cs.tu-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: interface renaming of an running interface X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 17:53:38 -0000 On Wed, 7 Apr 2004, Harti Brandt wrote: > I'm currently trying to teach bsnmp to correctly handle interface > renaming. One problem that I encounter is that a process listening on > the routing socket sees an interface departure and an interface arrival > message. This cause interfaces that run stateful protocols like SNMP on > ATM interfaces to drop all connections which isn't really all that nice. > The SNMP daemon would also loose all interface state and would report > the renamed interface as a new interface with a new ifindex. This > directly violates the IF-MIB RFC, because the daemon is required to > understand that this is the same interface (the ifindex doesn't really > help here, because unloading/loading the driver gives the same > behaviour). I would like to do one of the following two things: > > 1) disallow renaming an interface while it is up, or 2) instead of > emiting a departure/arrival pair of routing messages, generate a rename > message. > > Additionally I would like to create new sysctls: > > net.link.generic.ifdata..dname > net.link.generic.ifdata..dunit > > to access the driver's name of an interface. > > Comments? I was actually worried about this issue also -- FWIW, the issue already exists even without generic interface renaming because some interfaces (specifically, if_sl) already support renumbering on demand using ioctl(). I agree that what we need is a rename event -- the only real question is whether and how to handle compatibility for applications that don't know what to do with it. Presumably the only real question is for things like SNMP and routing daemons, although we've also talked about event monitoring for interfaces using devctl, in which case devd would need to learn about the "rename" primitive as well. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research