From sand@zunet.ru  Mon Jun 13 07:46:37 2005
Return-Path: <sand@zunet.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 249AD16A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Jun 2005 07:46:37 +0000 (GMT)
	(envelope-from sand@zunet.ru)
Received: from mail.zunet.ru (mail.zunet.ru [217.67.117.68])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 48ABE43D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Jun 2005 07:46:35 +0000 (GMT)
	(envelope-from sand@zunet.ru)
Received: (qmail 89245 invoked from network); 13 Jun 2005 07:56:37 -0000
Received: from mail.zunet.ru (HELO zunet.ru) (217.67.117.68)
  by mail.zunet.ru with SMTP; 13 Jun 2005 07:56:37 -0000
Received: (qmail 89241 invoked by uid 1002); 13 Jun 2005 07:56:37 -0000
Message-Id: <20050613075637.89240.qmail@zunet.ru>
Date: 13 Jun 2005 07:56:37 -0000
From: Stikheev Andrew <sand@zunet.ru>
Reply-To: Stikheev Andrew <sand@sand@zunet.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] ng_fec interface not running after assigning an address
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         82188
>Category:       kern
>Synopsis:       [netgraph] [patch] ng_fec interface not running after assigning an address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 13 07:50:10 GMT 2005
>Closed-Date:    Fri Sep 15 19:37:45 GMT 2006
>Last-Modified:  Fri Sep 15 19:37:45 GMT 2006
>Originator:     Stikheev Andrew
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sand.zuzino.mipt.ru 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sun Jun 12 02:16:10 MSD 2005 sand@sand.zuzino.mipt.ru:/usr/obj/usr/src/sys/MYKERNEL i386


	
>Description:
After creating fec interface and assigning address it's not in the running state
,
only in the up state. I should say 'ifconfig fec0 up' or run promiscuous mode   
to run it:

After startup:

fec0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
fxp0: flags=18843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,POLLING> mtu 1500
        options=48<VLAN_MTU,POLLING>
fxp2: flags=18843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,POLLING> mtu 1500
        options=48<VLAN_MTU,POLLING>

sand@video:~# ifconfig fec0 up
sand@video:~# fec0: port fxp0 in bundle is up
fec0: port fxp2 in bundle is up

sand@video:~# ifconfig fec0   
fec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
 
>How-To-Repeat:
	
>Fix:

--- ng_fec.c    Mon Jun 13 10:10:06 2005
+++ ng_fec.c.new        Mon Jun 13 10:14:04 2005
@@ -697,6 +697,8 @@ ng_fec_ioctl(struct ifnet *ifp, u_long c
 
        /* These two are mostly handled at a higher layer */
        case SIOCSIFADDR:
+               ifp->if_flags |= (IFF_UP | IFF_RUNNING);
+               ifp->if_flags &= ~(IFF_OACTIVE);
        case SIOCGIFADDR:
        case SIOCSIFMTU:
                error = ether_ioctl(ifp, command, data);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Sep 15 19:36:57 UTC 2006 
State-Changed-Why:  
I've fixed this bug long ago, in ng_fec.c,v 1.22. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82188 
>Unformatted:
