From nobody@FreeBSD.org  Tue Jun  5 11:34:20 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 050FC37B407
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Jun 2001 11:34:20 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f55IYJL18409;
	Tue, 5 Jun 2001 11:34:19 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200106051834.f55IYJL18409@freefall.freebsd.org>
Date: Tue, 5 Jun 2001 11:34:19 -0700 (PDT)
From: bannai@pacbell.net
To: freebsd-gnats-submit@FreeBSD.org
Subject: Cannot assign a IP address to a interface when a route to the same subnet exists in the routing table
X-Send-Pr-Version: www-1.0

>Number:         27891
>Category:       kern
>Synopsis:       Cannot assign a IP address to a interface when a route to the same subnet exists in the routing table
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 05 11:40:01 PDT 2001
>Closed-Date:    Wed Jun 6 01:35:05 PDT 2001
>Last-Modified:  Wed Jun 06 01:39:54 PDT 2001
>Originator:     Vinay Bannai
>Release:        4.2
>Organization:
Luminous Networks
>Environment:
FreeBSD ernestbsd.luminousnetworks.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000     jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386

>Description:
When assigning a IP address to a interface, you get a error when a route to the
same subnet already exists in the routing table. This can happen usually 
when running OSPF (or any routing protocol) when a route is learnt from
a neighbor. This populates the kernel routing table.

At a later stage when you add a interface on the subnet that is learnt from 
the neighbor, you get a error. We tried this by using a static route. I am not
sure if using a static route causes this problem.
>How-To-Repeat:
- Add a static route to the kernel routing table (eg. 172.16.0.0/16)
- Set the IP address of a interface (eg 172.16.100.10)

This causes the ifconfig to fail
>Fix:
I am not sure, but could this be related to using a static route. I will 
try with a dynamic routing protocol..

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Wed Jun 6 01:35:05 PDT 2001 
State-Changed-Why:  
This is the correct behavior. 

First, the IP address still gets assigned to the interface. 
It is the so-called "interface" route that can't be installed 
because the route to the same destination/netmask already 
exists in the routing table (whether static or not). 

Either delete this route before running ifconfig(8), or 
use a different netmask value. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27891 
>Unformatted:
