Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:10 -0000
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345798 - head/contrib/bsnmp/snmp_mibII
Message-ID:  <201904021338.x32Dc0Mj079674@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Apr  2 13:38:00 2019
New Revision: 345798
URL: https://svnweb.freebsd.org/changeset/base/345798

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

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 Apr  2 12:50:01 2019	(r345797)
+++ head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c	Tue Apr  2 13:38:00 2019	(r345798)
@@ -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?201904021338.x32Dc0Mj079674>