From owner-freebsd-bugs Sat Jul 6 0:33: 2 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C610137B400 for ; Sat, 6 Jul 2002 00:33:00 -0700 (PDT) Received: from porthos.spock.org (alb-66-67-128-5.nycap.rr.com [66.67.128.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE10443E42 for ; Sat, 6 Jul 2002 00:32:59 -0700 (PDT) (envelope-from jon@porthos.spock.org) Received: from porthos.spock.org (foouser@localhost [127.0.0.1]) by porthos.spock.org with ESMTP serial EF600Q3T-B7F; Sat, 6 Jul 2002 03:32:58 -0400 (EDT) (envelope-from jon@porthos.spock.org) X-OrigTo: freebsd-bugs@FreeBSD.org Received: (from jon@localhost) by porthos.spock.org (8.12.4/8.12.3/Submit) id g667Wvi2064392; Sat, 6 Jul 2002 03:32:57 -0400 (EDT) (envelope-from jon) Date: Sat, 6 Jul 2002 03:32:57 -0400 From: Jonathan Chen To: "Jin Guojun[DSD]" Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/21292: ifconfig warn but does duplicate IP address Message-ID: <20020706033257.D58146@porthos.spock.org> References: <200207051941.g65Jf3x2084537@freefall.freebsd.org> <3D25FD1B.4AF0217@lbl.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: telnet/1.1x In-Reply-To: <3D25FD1B.4AF0217@lbl.gov>; from j_guojun@lbl.gov on Fri, Jul 05, 2002 at 01:10:03PM -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Jul 05, 2002 at 01:10:03PM -0700, Jin Guojun[DSD] wrote: > Jonathan Chen wrote: > > > > Synopsis: ifconfig warn but does duplicate IP address > > > > State-Changed-From-To: open->closed > > State-Changed-By: jon > > State-Changed-When: Fri Jul 5 12:40:04 PDT 2002 > > State-Changed-Why: > > fixed [src/sys/netinet/in.c 1.44.2.8] > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=21292 > > I am not sure if this is completely fixed -- it is fixed if same netmask > is given. If a different netmask is used, the same IP can still be > assigned to a different interface, which is meaningless even they are > in different class. > > I think this type of checking should be simple IP only; ie., it should not > invoke netmask: The checking you refer to is actually done on the routing table. Generally, If you have two interfaces directly connected to the same subnet, the kernel cannot decide which interface to send packets through, hence the 'file exists' error. There is nothing inherently wrong with two interfaces having the same IP address. For instance, a CIDR router might use the same IP address for both the larger and smaller subnet, and multiple point-to-point interfaces in a machine will often have the same IP. Instead of having the kernel tell you what you don't want to do, I perfer the much simpler motto: If you don't want to do it, then don't do it. -Jon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message