summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
AgeCommit message (Collapse)Author
2015-08-21Use reallocarray() instead of malloc() before strvisx().Reyk Floeter
Found by deraadt@ OK blambert@
2015-07-20properly encode IpAddress, Gauge32, and Counter32Bret Lambert
varbinds received from subagents ok reyk@
2015-07-19don't return failure for agentx messages with 0-length payloadsBret Lambert
allows snmpd to properly handle ping messages from agentx subagents ok reyk@
2015-07-18Fix malformed packets when returning 'no such object/entry' errorsBret Lambert
for snmp requests ok reyk@
2015-07-18Use better names as examples for snmpv3 users. As explained to blambert@Reyk Floeter
2015-07-18Better track connected routes similar to bgpd/ospfd.Claudio Jeker
According to sthen@ this makes snmpd report routes more correct
2015-06-11Use "compliant" header guards by avoiding the reserved '_' namespace.Reyk Floeter
Pointed out by Markus Elfring OK mikeb@ millert@
2015-06-10Export new pf "no-route" error counterMike Belopuhov
OK sthen, blambert for the SNMP part
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-05-28Do not try to unlink the control socket in an unprivileged childFlorian Obser
process on shutdown. Found while working on tame(2). OK benno@
2015-02-12ber_printf_elements should return NULL if any of its parts fail.Martin Pelikan
Leave the error handling up to its callers. ok reyk
2015-02-10Remove a lie that "snmpd does not fully work yet". It works like a charm.Reyk Floeter
2015-02-08revert debug changes. reyk would like debug to remain a counter.Ted Unangst
2015-02-08flags should be flags, not counters. from martijn van durenTed Unangst
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-02-06SIZE_MAX is standard, we should be using it in preference to theTodd C. Miller
obsolete SIZE_T_MAX. OK miod@ beck@
2015-01-22Replace some obvious '$OpenBSD' and '$OpenBSD:' typos with '$OpenBSD$'.Kenneth R Westerback
Pointed out by dickman@. ok sthen@ phessler@
2015-01-21Include <netinet/in.h> before <net/pfvar.h>. In a future change whenTheo de Raadt
ports is ready, <net/pfvar.h> will stop including a pile of balony.
2015-01-16first batch of cleanup to programs based upon the namespace cleanupsTheo de Raadt
in net/pfvar.h sys/proc.h sys/ucred.h arpa/nameser.h change to PATH_MAX, reduce use of MIN() and MAX(), HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc etc ok millert guenther, some review by doug
2014-12-16Replace setpgrp(0, getpid()) with setpgid(0, 0). OK deraadt@ tedu@Todd C. Miller
2014-11-20Don't allow embedded nul characters in strings.Jonathan Gray
Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
2014-11-19file overlooked in previous snmpd commitBret Lambert
2014-11-19Support exporting relayd statistics via AgentX/snmpdBret Lambert
This should be equivalent to the statistics available via the various relaydctl show commands okay benno@ reyk@
2014-11-19add support for AgentX subagents in snmpdBret Lambert
snmp requests are now packaged into pseudo-continuations to allow for being dispatched to seperate processes; lightly tested for interoperability with NetSNMP, but doesn't implement the complete set of AgentX messages while here, clean up return types of mps_get* functions, and make smi_insert refuse to insert duplicate OIDs okay benno@ reyk@
2014-11-18Nuke more obvious #include duplications.Kenneth R Westerback
ok deraadt@ millert@ tedu@
2014-11-16Convert the logic in yyerror(). Instead of creating a temporaryAlexander Bluhm
format string, create a temporary message. OK doug@
2014-11-14Shorten the AgentX header debug messages (only compiled with -DDEBUG)Reyk Floeter
to a single line and print to stderr instead of stdout. This makes it easier to follow the debug output again. Also, as a rule of thumb, it is OK to exceed 80 chars for these kinds of developer debug messages. OK blambert@
2014-11-14Add gcc printf format attributes to yyerror() in parse.y files.Doug Hogan
No yyerror() calls needed to be changed. ok bluhm@
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
ok millert@
2014-10-16use reallocarray(). Looked at a few times by doug, I am sure.Theo de Raadt
2014-10-12Remove possibility of mutiplicative integer overflow by not multiplying.Bret Lambert
Instead of the widespread-but-overflow-prone while (newlen < wanted) { newlen *= 2; } idiom, just realloc() for the space requested by the caller and check for additive overflow. Also change type of 'newlen' variable from int to size_t to avoid overflows there. Pointed out by deraadt@ ok reyk@
2014-10-08obvious reallocarray()Theo de Raadt
2014-08-18Sync proc.c with httpd. httpd needs SIGUSR1 but snmpd will ignore itReyk Floeter
now instead of terminating the process. ok blambert@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-07-12Sync msgbuf_write() changes from relayd.Reyk Floeter
Please note that proc.c should be kept identical in relayd, iked and snmpd (currently without the includes). ok benno@
2014-07-04Track whether a process is a zombie or not yet fully built via flagsPhilip Guenther
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-level SDEAD state. Change kvm_getprocs() (both the sysctl() and kvm backends) to report the "most active" scheduler state for the process's threads. tweaks kettenis@ feedback and ok matthew@
2014-06-23The second level of the CTL_NET sysctl is a PF_*, not an AF_*Philip Guenther
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
2014-06-03Handle the event parameter of libevent callback function as a bitYASUOKA Masahiko
mask. Also remove redundant imsg_event_add calls. Fixes come from usr.sbin/ospfd/control.c ok reyk
2014-05-23clean up after the traphandler children, otherwise they will live onSebastian Benoit
as zombies. ok blambert
2014-05-16improve logging messages and style; requested by and ok reykMike Belopuhov
2014-05-14Sync ktable code with bgpd to fetch, store and perform lookups inMike Belopuhov
multiple routing tables. Currently it doesn't do anything useful but it's a prerequisite for any future work in this direction. ok sthen, reyk, blambert
2014-05-08Bring back restricted sockets, inadvertantly removed inBret Lambert
previous proc.c update ok reyk@
2014-05-07use calloc. from peter maloneTed Unangst
2014-05-06no need to include rand.h now the RAND_seed() calls are gone.Jonathan Gray
ok reyk@
2014-05-04With the recent change by deraadt@ to introduce kern.nosuidcoredump=3,Reyk Floeter
we don't need the horrible debug hack anymore that disabled privdrop and chroot to get core dumps of privsep processes. No functional change for the normal binary, only if it is compiled with the non-default -DDEBUG option.
2014-04-28fix memory leakBret Lambert
ok reyk@
2014-04-28Add support for exporting ARP table via ipNetToMediaTable OID.Mike Belopuhov
With help from blambert@ and sthen@, tested by sthen@, benno@ and myself; ok blambert
2014-04-28better proc id name (it handles traps, not alerts) for theBret Lambert
snmp trap handler
2014-04-25sort; ok blambertJason McIntyre
2014-04-25Remove NULL pointer dereference, which jsg insists I notBret Lambert
call a use-after free, from error path. found by and ok jsg@