NetBSD Problem Report #11830

Received: (qmail 9601 invoked from network); 28 Dec 2000 00:43:10 -0000
Message-Id: <E14BQun-000730-00@jellycat.pointless.net>
Date: Thu, 28 Dec 2000 00:27:29 +0000
From: jasper@pointless.net
Reply-To: jasper@pointless.net
To: gnats-bugs@gnats.netbsd.org
Subject: lo0 dosn't have IFF_RUNNING flag bit set.
X-Send-Pr-Version: 3.95

>Number:         11830
>Category:       kern
>Synopsis:       lo0 dosn't have the IFF_RUNNING flag bit set.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 28 00:44:00 +0000 2000
>Closed-Date:    Sun Oct 08 23:20:11 +0000 2006
>Last-Modified:  Sun Oct 08 23:25:00 +0000 2006
>Originator:     Jasper Wallace
>Release:        1.5_ALPHA2
>Organization:
>Environment:
	i386 laptop.
System: NetBSD jellycat.pointless.net 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (JELLYCAT.pnpbios) #6: Fri Sep 15 02:00:50 BST 2000 jasper@jellycat:/usr/src/sys/arch/i386/compile/JELLYCAT.pnpbios i386


>Description:
	lo0 under netbsd dosn't have the IFF_RUNNING bit set, it probably
should.
	I'm writing some php + snmp web pages for monitering vairous boxes,
and noticed that ucd-snmp maps IFF_RUNNING to ifAdminStatus and IFF_UP to
ifOperStatus, (which imho is the wrong way round). Since netbsd dosn't set
IFF_RUNNING on lo0 ifAdminStatus is set to down which makes it look like lo0
has been ifconfig'd down.

fwiw both Solaris 2.6 and FreeBSD 3.4-RELEASE have IFF_RUNNING on lo0.

>How-To-Repeat:
	look at the output of 'ifconfig lo0'
>Fix:

(not tested).

--- if_loop.c.bak	Thu Dec 28 00:23:07 2000
+++ if_loop.c	Thu Dec 28 00:25:52 2000
@@ -347,7 +347,7 @@
 	switch (cmd) {

 	case SIOCSIFADDR:
-		ifp->if_flags |= IFF_UP;
+		ifp->if_flags |= ( IFF_UP | IFF_RUNNING);
 		ifa = (struct ifaddr *)data;
 		if (ifa != 0 /*&& ifa->ifa_addr->sa_family == AF_ISO*/)
 			ifa->ifa_rtrequest = lortrequest;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: martin@netbsd.org
State-Changed-When: Sun, 08 Oct 2006 23:20:11 +0000
State-Changed-Why:
Fixed, thanks!


From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/11830 CVS commit: src/sys/net
Date: Sun,  8 Oct 2006 23:19:33 +0000 (UTC)

 Module Name:	src
 Committed By:	martin
 Date:		Sun Oct  8 23:19:33 UTC 2006

 Modified Files:
 	src/sys/net: if_loop.c

 Log Message:
 Make lo* always have the IFF_RUNNING flag set, to apease some
 SNMP apps. Fixes PR kern/11830.


 To generate a diff of this commit:
 cvs rdiff -r1.58 -r1.59 src/sys/net/if_loop.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.