From rivers@dignus.com Wed Jun 16 17:36:25 1999
Return-Path: <rivers@dignus.com>
Received: from smtp2.vnet.net (smtp2.vnet.net [166.82.1.32])
	by hub.freebsd.org (Postfix) with ESMTP id 0DC4514D10
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jun 1999 17:36:23 -0700 (PDT)
	(envelope-from rivers@dignus.com)
Received: from dignus.com (ponds.vnet.net [166.82.177.48])
	by smtp2.vnet.net (8.9.1a/8.9.1) with ESMTP id UAA21404
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jun 1999 20:37:01 -0400 (EDT)
Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3])
	by dignus.com (8.9.2/8.8.5) with ESMTP id UAA03098
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jun 1999 20:36:20 -0400 (EDT)
Received: (from rivers@localhost) by lakes.dignus.com (8.9.2/8.6.9) id UAA08247; Wed, 16 Jun 1999 20:36:19 -0400 (EDT)
Message-Id: <199906170036.UAA08247@lakes.dignus.com>
Date: Wed, 16 Jun 1999 20:36:19 -0400 (EDT)
From: Thomas David Rivers <rivers@dignus.com>
Reply-To: rivers@dignus.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: slattach followed by ifconfig sl0 doesn't work.
X-Send-Pr-Version: 3.2

>Number:         12251
>Category:       kern
>Synopsis:       slattach followed by ifconfig sl0 doesn't work.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 16 17:40:00 PDT 1999
>Closed-Date:    Tue Sep 14 02:17:31 PDT 1999
>Last-Modified:  Tue Sep 14 02:18:43 PDT 1999
>Originator:     Thomas David Rivers
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
Dignus, LLC
>Environment:

	FreeBSD 3.1-R and FreeBSD 3.2-R (maybe others)

>Description:

	If you do an slattach followed by an ifconfig - the ifconfig
	will report  
	  ifconfig: ioctl(SIOCAIFADDR): File exists
	because it attempts to add the same route to the routing
	table twice.

	The reason for this is that in_ifinit() (in /sys/netinet/in.c)
	calls the interface-specific ioctl routine to give it a "chance"
	to do things.   In the SL/IP case, if the slip unit sc_ttyp
	field is set (which it will be because slattach has associated
	the tty) - then if_up() will be called, which eventually adds
	the route to the route table.

	Later in in_ifinit(), rtinit() gets called again to add the
	exact same route.  The second call to rtinit() results in
	an EEXISTS return code because the route is already there.

>How-To-Repeat:

	slattach -c -s 9600 /dev/cuaa0
	ifconfig sl0 n.n.n.n m.m.m.m 

>Fix:

	Don't do slattach first - if the device isn't opened, this
	problem doesn't exist.

	[Unfortunately, sysintall does do the slattach first, which
	means SL/IP installs no longer work.]	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: ru 
State-Changed-When: Mon Sep 13 18:18:14 PDT 1999 
State-Changed-Why:  
Fixed in -current (if_sl.c,v 1.78). 
Awaiting approval to MFC from release engineer. 
State-Changed-From-To: feedback->closed 
State-Changed-By: ru 
State-Changed-When: Tue Sep 14 02:17:31 PDT 1999 
State-Changed-Why:  
Fixed in -stable (if_sl.c,v 1.70.2.2). 
>Unformatted:
