summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
AgeCommit message (Collapse)Author
2011-04-21no need to escape `|';Jason McIntyre
2011-04-21Add a "filter-routes" option; when set, snmpd asks the kernel not toStuart Henderson
send route updates. If you aren't interested in examining routing tables over SNMP (e.g. if you only use it for sensors or interface stats) this reduces cpu use during heavy route updates. Makes my full-table bgp routers happier when a major peer bounces. ok reyk@
2011-04-10Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc nowPhilip Guenthe
that we've got name we want for the API we want "ZAP!" deraadt@
2011-03-16fix trap sending in snmpd by adjusting snmpctl to the imsg libutilReyk Floeter
change and fixing the ber element handling in snmpd itself. tested by jsg@
2011-03-07continguous -> contiguousHenning Brauer
From: "Anthony J. Bentley" <anthonyjbentley at gmail dot com>
2010-10-18Missing ; to appease yyextract, ok martinh@Stuart Henderson
2010-10-15return numeric 0 rather than attempting to return a null string,Stuart Henderson
fixes a segfault when walking memiftable. seems sane to phessler, ok dlg@
2010-10-15typo in commentStuart Henderson
2010-09-23tweak the mclgeti algorithm to behave better under load.David Gwynne
instead of letting hardware rings grow on every interrupt, restrict it so it can only grow once per softclock tick. we can only punish the rings on softclock ticks, so it make sense to only grow on softclock tick boundaries too. the rings are now punished after >1 lost softclock tick rather than >2. mclgeti is now more aggressive at detecting livelock. the rings get punished by an 8th, rather than by half. we now allow the rings to be punished again even if the system is already considered in livelock. without this diff a livelocked system will have its rx ring sizes scale up and down very rapidly, while holding the rings low for too long. this affected throughput significantly. discussed and tested heavily at j2k10. there are still some games with softnet we can play, but this is a good first step. "put it in" and ok deraadt@ ok claudio@ krw@ henning@ mcbride@ if we find out that it sucks we can pull it out again later. till then we'll run with it and see how it goes.
2010-09-20fix-up the sysORTable by using the same name (sensorsMIBObjects) as usedStuart Henderson
in the MIB, rather than a different spelling (sensorMIBObjects). ok martinh@
2010-09-20Use strvis to encode octet strings in -DDEBUG mode.Martin Hedenfal
Makes my terminal happier when debugging.
2010-09-20Return error on GET requests without an instance identifier, both forMartin Hedenfal
tables and scalar values. Fixes system/6468 by not calling table get functions with an unexpectedly short OID. Also fixes system/6071. Scalar variables without an instance specified now returns a noSuchInstance error. GetNext requests correctly returns the .0 instance. This means you can no longer rely on $ snmpget -v2c -c public localhost SNMPv2-MIB::sysDescr returning the .0 instance. You need to specify it explicitly: $ snmpget -v2c -c public localhost SNMPv2-MIB::sysDescr.0 Also return proper SNMPv2 errors per varbind instead of a noSuchName error status, unless SNMPv1 was specified in the request. An earlier version of this diff tested by Remi Laurent, thanks.
2010-09-20ber_scanf_elements "i" format expects a long long pointer.Martin Hedenfal
2010-09-20Allow output of null values with a context class. This is used in SNMPv2 toMartin Hedenfal
return an error exception value for a varbind result ("noSuchObject[0] IMPLICIT NULL" in rfc1905).
2010-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-07-18fix a double "is";Jason McIntyre
2010-06-14Fixes unlinking the first element inside a set or a sequence, andMartin Hedenfal
fix reading empty sequences/sets. This minimizes the changes against ldapd. "looks good" pyr@, ok reyk@
2010-06-11Implement IP-FORWARD-MIB, ipv4 only for now.Jonathan Gray
ok reyk@ claudio@
2010-06-08ber_calc_len() is not an internal function, so adjust the comment.Martin Hedenfal
from Dawe
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-24now that we can handle >9 args, put "-D name=value" on one line: it's a bitJason McIntyre
more readable, and fixes a spacing bug we had in smtpd.8;
2010-05-14Use calloc() instead of malloc() to allocate the connection structure. ThisClaudio Jeker
way the memory is zeroed. This is equivalent to the relayd commit by reyk. OK reyk, jsg
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
2010-04-27Correct sensor logic so we don't get stuck in a loop.Jonathan Gray
ok deraadt@
2010-04-27Dumb mistake done twice. First in ospfd then synced to snmpd. rtm_errnoClaudio Jeker
is only valid for messages with an rt_msghdr. So move the check back where it was before. Problem found by jsg@
2010-04-20Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledTheo de Raadt
by returning ENXIO instead of ENOENT, to essentially indicate hotplug sensor that has gone away. Accessing beyond the end of the sensordev list still returns ENOENT, so that you can see there are no further devices. ok kettenis oga
2010-04-20Add "frequency" type for sensors. (and teach userland how to print thatOwain Ainsworth
type). Measured in Hz. ok deraadt@
2010-04-15add SENSOR_HUMIDITY to sensor framework to handle humidity valuesYojiro Uo
ok kettenis@ xsa@ sobrado@ krw@ deraadt@
2010-04-07Remove XXX comment and just close received fd if calloc() fails.Nicholas Marriott
If this happens the imsg may no longer be usable as there may be queued messages, but this is a) already the case with the code now, and b) would be the case if recvmsg() fails anyway, so we can document that -1 from imsg_read() invalidates the struct imsgbuf. discussed with and ok eric
2010-04-01Track blackhole and reject flags since the MIB knows about them.Claudio Jeker
Remove an unneeded stack storage as well. OK jsg@
2010-04-01After syncing kroute with bgpd sync now against ospfd's so that this codeClaudio Jeker
uses only one rtm parser instead of three different ones. Fixes problems with priorities that were not handled everywhere correctly. Found by and OK jsg@
2010-03-31Track interface addresses in a AF independent way. This is needed to supportClaudio Jeker
the AF independent MIBs like RFC4292 in the future. Additionally count number of routes (also needed by some MIBs) and do not track the state of routes since the MIB do not require it and it is expensive. OK jsg@
2010-03-29Sync kroute.c code with bgpd so that snmpd is able to track INET6 addrs asClaudio Jeker
well. First big sync, the interface address tree still needs to be made AF independent but that will be done in a second step. OK jsg@
2010-02-25a little cleanup;Jason McIntyre
2010-02-24manual pages should not have blank lines outside literal context,Ingo Schwarze
and .Pp is not needed before or after .Sh; found by mandoc -Tlint; "please fix" jmc@
2010-02-24match code and doc; ok claudioJason McIntyre
2010-02-23Fix .Oo .Xo .Oc .Xc mis-nesting by just dropping the .Xo and .Xc which,Ingo Schwarze
in these cases, is useless anyway. Found by and fixing the build with mandoc; still fine with both old and new groff. ok jmc@
2010-01-11Do not use after free kif->if_index; discovered with claudioTheo de Raadt
ok dlg
2010-01-11use calloc() instead of multiplying for malloc(); ok reykTheo de Raadt
2009-12-16knf and unused variablesTheo de Raadt
2009-12-02log_warn() consistency.Michael Knudsen
`OK' claudio
2009-11-26sync snmp_imsg_hdr with imsg_hdr and unbreak the snmp trap interfaceReyk Floeter
2009-11-12accessses 1 entry too far, found by parfait, ok jsg claudioTheo de Raadt
2009-09-15Enclose repeated buffer draining code in a new msgbuf_drain()Jacek Masiulaniec
function, which is additionally exported for use by others. It will be needed by smtpd's SSL module when the SMTP client code is changed to replace libevent's evbuffers with our msgbuf_* API. ok gilles@ henning@ guenther@ eric@
2009-08-14SENSOR_WATTS; ok reyk deraadtConstantine A. Murenin
2009-08-08Make imsg_clear close and free any fds in the received fd queue as well asNicholas Marriott
freeing the msgbuf. While here also remove an unnecessary while loop. ok eric pyr
2009-07-23make buf_write() behave like msgbuf_write(): send out only theEric Faurot
bytes that were filled, not the whole buffer. ok pyr@ gilles@
2009-06-25Another kroute.c needing RTM_VERSION checks. Looked over by sthen@ and henning@Claudio Jeker
2009-06-08revert this change by eric@:David Gwynne
Make the imsg protocol network-safe. it might be network safe, but half the imsg based daemons on my firewalls dont run anymore.