[Midnightbsd-cvs] src [11006] sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Jun 15 18:23:45 EDT 2018
Revision: 11006
http://svnweb.midnightbsd.org/src/?rev=11006
Author: laffer1
Date: 2018-06-15 18:23:44 -0400 (Fri, 15 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
trunk/usr.sbin/bsnmpd/modules/snmp_pf/Makefile
trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
Property Changed:
----------------
trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
Modified: trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
===================================================================
--- trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt 2018-06-15 22:22:44 UTC (rev 11005)
+++ trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt 2018-06-15 22:23:44 UTC (rev 11006)
@@ -1,4 +1,4 @@
---
+--
-- ----------------------------------------------------------------------------
-- "THE BEER-WARE LICENSE" (Revision 42):
-- <philip at FreeBSD.org> wrote this file. As long as you retain this notice you
@@ -6,8 +6,8 @@
-- this stuff is worth it, you can buy me a beer in return. -Philip Paeps
-- ----------------------------------------------------------------------------
--
+-- $FreeBSD: stable/10/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt 310903 2016-12-31 10:34:09Z ngie $
-- $MidnightBSD$
---
BEGEMOT-PF-MIB DEFINITIONS ::= BEGIN
@@ -585,7 +585,7 @@
pfInterfacesIfDescr OCTET STRING,
pfInterfacesIfType INTEGER,
pfInterfacesIfTZero TimeTicks,
- pfInterfacesIfRefsState Unsigned32,
+ pfInterfacesIfRefsState Null,
pfInterfacesIfRefsRule Unsigned32,
pfInterfacesIf4BytesInPass Counter64,
pfInterfacesIf4BytesInBlock Counter64,
@@ -612,7 +612,7 @@
DESCRIPTION
"A unique value, greater than zero, for each interface."
::= { pfInterfacesIfEntry 1 }
-
+
pfInterfacesIfDescr OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
@@ -876,7 +876,7 @@
cleared or the time since this table was loaded, whichever is
sooner."
::= { pfTablesTblEntry 4 }
-
+
pfTablesTblRefsAnchor OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
@@ -1294,7 +1294,7 @@
STATUS current
DESCRIPTION
"A unique value, greater than zero, for each label."
- ::= { pfLabelsLblEntry 1 }
+ ::= { pfLabelsLblEntry 1 }
pfLabelsLblName OBJECT-TYPE
SYNTAX OCTET STRING
Property changes on: trunk/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bsnmpd/modules/snmp_pf/Makefile
===================================================================
--- trunk/usr.sbin/bsnmpd/modules/snmp_pf/Makefile 2018-06-15 22:22:44 UTC (rev 11005)
+++ trunk/usr.sbin/bsnmpd/modules/snmp_pf/Makefile 2018-06-15 22:23:44 UTC (rev 11006)
@@ -1,5 +1,6 @@
# $MidnightBSD$
-#
+# $FreeBSD: stable/10/usr.sbin/bsnmpd/modules/snmp_pf/Makefile 310903 2016-12-31 10:34:09Z ngie $
+#
# Author: Philip Paeps <philip at freebsd.org>
MOD= pf
Modified: trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
===================================================================
--- trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c 2018-06-15 22:22:44 UTC (rev 11005)
+++ trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c 2018-06-15 22:23:44 UTC (rev 11006)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2005 Philip Paeps <philip at FreeBSD.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c 310913 2016-12-31 10:45:01Z ngie $
*/
#include <sys/queue.h>
@@ -586,11 +587,8 @@
val->v.uint32 =
(time(NULL) - e->pfi.pfik_tzero) * 100;
break;
- case LEAF_pfInterfacesIfRefsState:
- val->v.uint32 = e->pfi.pfik_states;
- break;
case LEAF_pfInterfacesIfRefsRule:
- val->v.uint32 = e->pfi.pfik_rules;
+ val->v.uint32 = e->pfi.pfik_rulerefs;
break;
case LEAF_pfInterfacesIf4BytesInPass:
val->v.counter64 =
@@ -653,7 +651,7 @@
e->pfi.pfik_packets[IPV6][OUT][PASS];
break;
case LEAF_pfInterfacesIf6PktsOutBlock:
- val->v.counter64 =
+ val->v.counter64 =
e->pfi.pfik_packets[IPV6][OUT][BLOCK];
break;
@@ -935,7 +933,7 @@
abort();
return (SNMP_ERR_GENERR);
-}
+}
int
pf_altqq(struct snmp_context __unused *ctx, struct snmp_value *val,
@@ -990,7 +988,7 @@
case LEAF_pfAltqQueueLimit:
val->v.integer = e->altq.qlimit;
break;
-
+
default:
return (SNMP_ERR_NOSUCHNAME);
}
@@ -1228,7 +1226,7 @@
}
bzero(&pa, sizeof(pa));
-
+
if (ioctl(dev, DIOCGETALTQS, &pa)) {
syslog(LOG_ERR, "pfq_refresh: ioctl(DIOCGETALTQS): %s",
strerror(errno));
@@ -1263,7 +1261,7 @@
INSERT_OBJECT_INT_LINK_INDEX(e, &pfq_table, link, index);
}
}
-
+
pfq_table_age = time(NULL);
pf_tick = this_tick;
@@ -1643,20 +1641,20 @@
static int
altq_is_enabled(int pfdev)
{
- struct pfioc_altq pa;
+ struct pfioc_altq pa;
errno = 0;
- if (ioctl(pfdev, DIOCGETALTQS, &pa)) {
- if (errno == ENODEV) {
+ if (ioctl(pfdev, DIOCGETALTQS, &pa)) {
+ if (errno == ENODEV) {
syslog(LOG_INFO, "No ALTQ support in kernel\n"
"ALTQ related functions disabled\n");
- return (0);
- } else
- syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
+ return (0);
+ } else
+ syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
strerror(errno));
return (-1);
- }
- return (1);
+ }
+ return (1);
}
/*
@@ -1677,7 +1675,7 @@
syslog(LOG_ERR, "pf_init(): altq test failed");
return (-1);
}
-
+
/* Prepare internal state */
TAILQ_INIT(&pfi_table);
TAILQ_INIT(&pfq_table);
@@ -1768,7 +1766,7 @@
(intmax_t)pfi_table_age);
syslog(LOG_ERR, "Dump: pfi_table_count = %d",
pfi_table_count);
-
+
syslog(LOG_ERR, "Dump: pfq_table_age = %jd",
(intmax_t)pfq_table_age);
syslog(LOG_ERR, "Dump: pfq_table_count = %d",
Modified: trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
===================================================================
--- trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def 2018-06-15 22:22:44 UTC (rev 11005)
+++ trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def 2018-06-15 22:23:44 UTC (rev 11006)
@@ -24,6 +24,7 @@
# SUCH DAMAGE.
#
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def 240233 2012-09-08 06:41:54Z glebius $
#
(1 internet
@@ -108,7 +109,7 @@
(2 pfInterfacesIfDescr OCTETSTRING GET)
(3 pfInterfacesIfType ENUM ( 0 group 1 instance 2 detached ) GET)
(4 pfInterfacesIfTZero TIMETICKS GET)
- (5 pfInterfacesIfRefsState UNSIGNED32 GET)
+ (5 pfInterfacesIfRefsState NULL GET)
(6 pfInterfacesIfRefsRule UNSIGNED32 GET)
(7 pfInterfacesIf4BytesInPass COUNTER64 GET)
(8 pfInterfacesIf4BytesInBlock COUNTER64 GET)
Property changes on: trunk/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list