summaryrefslogtreecommitdiffstats
path: root/usr.sbin/snmpd/kroute.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() callskrw2019-01-221-2/+2
| | | | | | where the "wrong" #define was used. ok dlg@
* Be more strict in converting a netmask into a prefixlen. Make sureclaudio2018-12-071-10/+14
| | | | | the prefixlen is never bigger than 128 for inet6. OK remi@
* RT_TABLEID_MAX is 255, fix places that assumed that it is less than 255.reyk2018-10-101-2/+2
| | | | | | | | | | rtable 255 is a valid routing table or domain id that wasn't handled by the ip[6]_mroute code or by snmpd. The arrays in the ip[6]_mroute code where off by one and didn't allocate space for rtable 255; snmpd simply ignored rtable 255. All other places in the tree seem to handle RT_TABLEID_MAX correctly. OK florian@ benno@ henning@ deraadt@
* Unify ROUNDUP macros for parsing route messages.friehm2017-07-241-3/+3
| | | | | | Use the macro from route(8) / ospf6d(8) since it works also with argument 0. OK claudio@
* Use snmpd_env as the only global variable for env to simplify the daemonrzalamena2016-10-281-5/+4
| | | | | | and avoid problems. ok jca@
* Fix pasto; zero ka->dstbrd instead of clobbering ka->mask.jca2016-09-031-3/+2
| | | | Diff from Jan Klemkow, ok mikeb@
* When updating an interface, do not delete the kif_node but letgerhard2015-11-031-7/+7
| | | | | | | | fetchifs() update the existing node. Thus we don't lose the ARP entries. And while here, also handle RTM_DESYNC messages. ok mikeb@
* Better track connected routes similar to bgpd/ospfd.claudio2015-07-181-1/+13
| | | | According to sthen@ this makes snmpd report routes more correct
* first batch of cleanup to programs based upon the namespace cleanupsderaadt2015-01-161-2/+1
| | | | | | | 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
* use reallocarray(). Looked at a few times by doug, I am sure.deraadt2014-10-161-4/+5
|
* The second level of the CTL_NET sysctl is a PF_*, not an AF_*guenther2014-06-231-5/+5
| | | | inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
* improve logging messages and style; requested by and ok reykmikeb2014-05-161-53/+59
|
* Sync ktable code with bgpd to fetch, store and perform lookups inmikeb2014-05-141-69/+232
| | | | | | | 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
* Add support for exporting ARP table via ipNetToMediaTable OID.mikeb2014-04-281-4/+221
| | | | | With help from blambert@ and sthen@, tested by sthen@, benno@ and myself; ok blambert
* another simple %i to %d conversion for obviousnessderaadt2013-10-301-3/+3
|
* pasto in log messageflorian2012-11-131-2/+2
| | | | ok henning
* sync mask2prefixlen6() with the nicer version from bgpd/kroute.c:reyk2012-09-181-7/+7
| | | | | | "Instead of doing a poor mans offsetof() implementation change the code to use an end pointer to compare against. Looks less scary and makes gcc4 happy. OK henning@" (bgpd/kroute.c commit 1.182)
* knfreyk2012-09-181-4/+4
|
* Update copyright and my email address in snmpd while I'm here.reyk2012-09-171-2/+2
|
* kr_init() now returns void so don't try to return 0jsg2012-06-101-3/+1
|
* Plug a couple more fd leaks. As part of the fix, make all the *initjoel2012-05-281-12/+8
| | | | | | functions return void. ok krw@
* Add a "filter-routes" option; when set, snmpd asks the kernel not tosthen2011-04-211-1/+7
| | | | | | | 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@
* continguous -> contiguoushenning2011-03-071-2/+2
| | | | From: "Anthony J. Bentley" <anthonyjbentley at gmail dot com>
* typo in commentsthen2010-10-151-2/+2
|
* Implement IP-FORWARD-MIB, ipv4 only for now.jsg2010-06-111-1/+24
| | | | ok reyk@ claudio@
* Dumb mistake done twice. First in ospfd then synced to snmpd. rtm_errnoclaudio2010-04-271-3/+3
| | | | | | is only valid for messages with an rt_msghdr. So move the check back where it was before. Problem found by jsg@
* Track blackhole and reject flags since the MIB knows about them.claudio2010-04-011-26/+21
| | | | | Remove an unneeded stack storage as well. OK jsg@
* After syncing kroute with bgpd sync now against ospfd's so that this codeclaudio2010-04-011-130/+45
| | | | | | 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@
* Track interface addresses in a AF independent way. This is needed to supportclaudio2010-03-311-105/+66
| | | | | | | 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@
* Sync kroute.c code with bgpd so that snmpd is able to track INET6 addrs asclaudio2010-03-291-320/+519
| | | | | | 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@
* Another kroute.c needing RTM_VERSION checks. Looked over by sthen@ and henning@claudio2009-06-251-1/+5
|
* rtm->rtm_hdrlen conversionchris2009-06-051-3/+3
| | | | ok claudio@, henning@
* bump copyrightreyk2008-01-161-2/+2
|
* add the IP-MIB ipAddrTable. it requires to encode the ipv4 addressesreyk2007-12-291-5/+116
| | | | | | in the OIDs as the table index. the next step is to simplify the common mib implementation regarding the special requirements of these strange snmp tables.
* split code handling the "structure of management information" and thereyk2007-12-281-7/+7
| | | | "message processing subsystem" into separate files smi.c and mps.c
* spacingreyk2007-12-281-3/+4
|
* correct bizzare function definitionderaadt2007-12-061-3/+3
|
* Start working on snmpd(8) and snmpctl(8), a lightweight SNMP implementationreyk2007-12-051-0/+1093
for OpenBSD. SNMP is a necessary evil. This is work in progress, don't expect too much from it yet. ok deraadt@