Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2019 17:41:42 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347025 - stable/11/contrib/bsnmp/snmp_mibII
Message-ID:  <201905021741.x42Hfg2J008766@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Thu May  2 17:41:42 2019
New Revision: 347025
URL: https://svnweb.freebsd.org/changeset/base/347025

Log:
  MFC r345798:
    Create 64bit mibII counters for all interfaces.
  
    PR:		157015
    Obtained from:	Yandex LLC

Modified:
  stable/11/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
==============================================================================
--- stable/11/contrib/bsnmp/snmp_mibII/mibII_interfaces.c	Thu May  2 17:04:01 2019	(r347024)
+++ stable/11/contrib/bsnmp/snmp_mibII/mibII_interfaces.c	Thu May  2 17:41:42 2019	(r347025)
@@ -373,11 +373,6 @@ op_ifxtable(struct snmp_context *ctx, struct snmp_valu
 
 	switch (op) {
 
-  again:
-		if (op != SNMP_OP_GETNEXT)
-			return (SNMP_ERR_NOSUCHNAME);
-		/* FALLTHROUGH */
-
 	  case SNMP_OP_GETNEXT:
 		if ((ifp = NEXT_OBJECT_INT(&mibif_list, &value->var, sub)) == NULL)
 			return (SNMP_ERR_NOSUCHNAME);
@@ -460,52 +455,36 @@ op_ifxtable(struct snmp_context *ctx, struct snmp_valu
 		break;
 
 	  case LEAF_ifHCInOctets:
-		if (!(ifp->flags & MIBIF_HIGHSPEED))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_inoctets;
 		break;
 
 	  case LEAF_ifHCInUcastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_ipackets -
 		    MIBIF_PRIV(ifp)->hc_imcasts;
 		break;
 
 	  case LEAF_ifHCInMulticastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_imcasts;
 		break;
 
 	  case LEAF_ifHCInBroadcastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = 0;
 		break;
 
 	  case LEAF_ifHCOutOctets:
-		if (!(ifp->flags & MIBIF_HIGHSPEED))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_outoctets;
 		break;
 
 	  case LEAF_ifHCOutUcastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_opackets -
 		    MIBIF_PRIV(ifp)->hc_omcasts;
 		break;
 
 	  case LEAF_ifHCOutMulticastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = MIBIF_PRIV(ifp)->hc_omcasts;
 		break;
 
 	  case LEAF_ifHCOutBroadcastPkts:
-		if (!(ifp->flags & (MIBIF_VERYHIGHSPEED|MIBIF_HIGHSPEED)))
-			goto again;
 		value->v.counter64 = 0;
 		break;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905021741.x42Hfg2J008766>