From owner-svn-src-head@FreeBSD.ORG Tue May 3 10:11:45 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44B1B106566B; Tue, 3 May 2011 10:11:45 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3048B8FC19; Tue, 3 May 2011 10:11:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43ABjII080104; Tue, 3 May 2011 10:11:45 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43ABjcm080102; Tue, 3 May 2011 10:11:45 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031011.p43ABjcm080102@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 10:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221373 - head/contrib/bsnmp/snmp_mibII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 10:11:45 -0000 Author: ru Date: Tue May 3 10:11:44 2011 New Revision: 221373 URL: http://svn.freebsd.org/changeset/base/221373 Log: Properly detect interface's state in the LINK_STATE_UNKNOWN case. MFC after: 1 week Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Tue May 3 10:08:11 2011 (r221372) +++ head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Tue May 3 10:11:44 2011 (r221373) @@ -289,8 +289,7 @@ op_ifentry(struct snmp_context *ctx, str * cable) and hence return 'dormant'. */ if (ifp->mib.ifmd_flags & IFF_RUNNING) { - if (ifp->mib.ifmd_data.ifi_link_state == - LINK_STATE_DOWN) + if (ifp->mib.ifmd_data.ifi_link_state != LINK_STATE_UP) value->v.integer = 5; /* state dormant */ else value->v.integer = 1; /* state up */