summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2022-06-23Thanks IPv6 for being extra complex. Recover scope_id for link local addrs.Claudio Jeker
OK tb@
2022-06-23Replace struct kroute_node and kroute6_node with direct versions ofClaudio Jeker
struct kroute and kroute6. Rename knexthop_node to knexthop as well. Mostly mechanical but fix at least one log format string to have the correct order of arguments. OK tb@
2022-06-22Move struct kroute and kroute6 to kroute.c and out of bgpd.hClaudio Jeker
OK tb@
2022-06-22Use struct kroute_full in bgpd_filternexthop() so this code becomes a lotClaudio Jeker
simpler. OK tb@
2022-06-22Adjust code after changing struct ctl_show_nexthop to embed a struct kroute_fullClaudio Jeker
OK tb@
2022-06-22Sync KAME hack in log_in6addr() with route/show.cTheo Buehler
ok claudio
2022-06-22Use struct kroute_full instead of a union of struct kroute & kroute6.Claudio Jeker
struct kroute_full is address family independent and so more portable. Also struct kroute and struct kroute6 will be kroute.c internal soon. OK tb@
2022-06-22Remove comment which is no longer true.Claudio Jeker
2022-06-22Fix last commit. addr is already a pointer.Claudio Jeker
Noticed by anton@
2022-06-21Use applymask() instead of inetXapplymask() since this code operates onClaudio Jeker
struct bgpd_addr. OK tb@
2022-06-19Implement a applymask() function that works on bgpd_addr structs.Claudio Jeker
Use this function in kroute so that kroute_find and kroute6_find can switch to use struct bgpd_addr as argument. OK tb@
2022-06-17Adapt the KAME hack in sa2addr() to be the same as in route/show.cClaudio Jeker
Also fix the function by moving the memcpy() after the embedded scope has been removed. OK tb@
2022-06-16OpenBSD syslogd(8) escapes binary data with vis(3). Use theAlexander Bluhm
VIS_NOSLASH option to avoid additional backslashes. Although this option prevents to decode binaries, it makes automatic post processing easier. Formats like JSON use backslash escaping themself, additional escaping from syslogd would break SIEM systems. vis protection was introduced to avoid evil characters in log files and not to make binary logging possible. from Matthias Pitzl; OK deraadt@
2022-06-16RRDP serial numbers should only increase.Claudio Jeker
Warn if the serial number decreases between syncs. On top of this only allow a small window of up to 2 deltas from the current one to consider our cache to be in sync. The number 2 is probably to conservative and should be adjusted once some data points got collected. It seems to happen that CAs restore RRDP snapshots instead of building a fresh snapshot with a new session-id. Which results in rpki-client to ignore the repo until the serial number is bigger again. OK tb@
2022-06-16Neither inet4allone nor inet6allone need global scope. Make them static.Claudio Jeker
Noticed by tb@
2022-06-16Remove prefixlen2mask() uasge outside of util.c. Instead use inet4applymask().Claudio Jeker
Neccessary after similar change in bgpd. OK tb@
2022-06-16Remove prefixlen2mask() uasge outside of util.c. Instead use inet4applymask().Claudio Jeker
Using inet4applymask() makes the code similar to the IPv6 version. Also switch kroute{,6}_match() to use a struct bgpd_addr * as argument. OK tb@
2022-06-16If anything in name2id conversion fails then just return 0.Claudio Jeker
Do not set any errno. So if a non empty string is used in name2id conversion and the return value is 0 then that would be an error. Callers in most cases do not care and accept that a label may be lost because of conversion failure. Noticed by and OK tb@
2022-06-16Remove __func__ from warning messages where it does not add anythingClaudio Jeker
to the warning. The messages are clear enough and unique. OK tb@
2022-06-15Prevent busy poll loop on pfkey message error.Claudio Jeker
When pfkey_reply() detects an error in a message it needs to flush that message out of the buffer because pfkey_read() only did a peak read. OK tb@
2022-06-15Need to continue to the next message for route messages with errorsClaudio Jeker
or which are not marked RTF_DONE. Possible fix for bgpd exiting for no obvious reason. Found with help from florian@ OK florian@
2022-06-15Do not use defines from pfkeyv2.h in portable code.Claudio Jeker
Instead define our own algorithm enums for the IPsec code. OK tb@ sthen@
2022-06-15Adjust after chaning F_BGPD_INSERTED to F_BGPD and removal of F_DYNAMICClaudio Jeker
2022-06-15Rename F_BGPD_INSERTED to F_BGPD and use F_BGPD_INSERTED as a flag thatClaudio Jeker
indicates that the route was successfully added to the FIB. Filter out dynamic routes, like it is already done for ARP and ND routes) and kill F_DYNAMIC. Also remove the protect_lo() bits. Adding dummy kroute entries does no longer prevent bad routes to hit the FIB. Also loopback IPs are checked in a few other places to prevent bad routes to be installed into the FIB. OK tb@
2022-06-14Add my copyright, I think I added enough code to justify it.Claudio Jeker
2022-06-14Bump version to 7.4Claudio Jeker
2022-06-13Split dispatch_rtmsg_addr() into a function parsing a route messageClaudio Jeker
into a struct kroute_full and then two functions to add/change or delete that route from the kroute tree. Cleanup some additional things and use the same parse funtion in fetchtable. OK tb@
2022-06-10Unify error messages on d2i failure for econtentTheo Buehler
2022-06-10Dedup econtent version checksTheo Buehler
Since the ASN.1 template conversions, we have three copies of mostly dead code that validates that the econtent version is at its default value 0. Until a new standard bumps this version and we decide to support that, we're better off with only one copy of this code. ok claudio
2022-06-09Properly error out if a variable does not exist. Need to pass backClaudio Jeker
ERROR to yylex() to make the parser fail nicely. OK tb@
2022-06-09Change argument of ktable_get from ifd->ifi_rdomain to kif->k.rdomain.Claudio Jeker
It is the same value but using the kif seems better.
2022-06-09Remove the rdomain / rtableid passed to some kroute functions.Claudio Jeker
kr_nexthop_add() and kr_nexthop_delete() only operate on the main table so just pass in the right rdomain id. kr_shutdown() and kr_dispatch_msg() don't really need the rdomain passed. The was done for kif_remove(), since that function needs to remove connected routes from the rdomain table. Connected routes can only exists in the interfaces rdomain so just use kif->k.rdomain. If such routes exist that table exists as well. If the table does not exists there are also no connected routes to track. OK tb@
2022-06-09Readd ETHERTYPE_NHRPA case.mbuhl
Found by Stefan Butz. ok dlg@
2022-06-09se more specific discrimination to know if extra data is still there afterMarc Espie
an update.
2022-06-08recognize @extraglob for laterMarc Espie
okay sthen@
2022-06-08Add a new option which allows to set an alternative base-directory toMarcus Glocker
download the installation files to. This is helpful if the default base-directory /home isn't available for writing, i.e. when using auto mounted home directories. Discussed with and input received from florian@, jmc@, sthen@, schwarze@, and ajacoutot@. OK florian@, jmc@, sthen@
2022-06-07Try to be more precise with rtlabelid tracking.Claudio Jeker
By moving the rtlabel_unref into kroute_remove the unref is more reliable. There are still places where handling is not quite right but it is a step in the right direction. OK tb@
2022-06-07uint8_t not u_int8_t. Damn finger memory.Claudio Jeker
2022-06-07Retire F_RTLABEL it was not used for anything.Claudio Jeker
Also cleanup some redundant if statements. OK tb@
2022-06-07merge unbound 1.16.0Stuart Henderson
2022-06-07update to unbound 1.16.0, discussed with florian@, test from Renaud AllardStuart Henderson
2022-06-07Fix path validation of AS numbersTheo Buehler
If a certificate along the chain does not have an AS numbers extension, this is a failure condition according to RFC 3779, section 3.3. ok job
2022-06-06have compute_checksum return a status, so that we don't report similarMarc Espie
errors several times (for instance, if a file doesn't exist, its checksum is not going to match, obviously)
2022-06-06zap fairly old bug from refactoring: we already validated all the set plists,Marc Espie
don't do it again (would skew the file system usage a bit). Also: we don't need to check for firmware if we're not actively deleting. normal updates won't touch them.
2022-06-06this message is seriously outdated: the packing-lists have been read byMarc Espie
the code that calls delete_handle already
2022-06-06Yet another iteration of the tied algorithm: some packages containMarc Espie
several hundred copies of the same file (even thousands! I'm looking at you sdcc), so matching through a list is O(n^2). So hash the hashes on the actual file name so that we match directly if the same name file didn't change, and use the first entry otherwise, since the name won't match. speeds up updating of texlive somewhat, and makes a huge difference for sdcc.
2022-06-06also zap signer if we zap digital-signatureMarc Espie
2022-06-06expand on the mismatches between the tarball and the packing-listMarc Espie
2022-06-05Revert accidentally committed checkTheo Buehler
2022-06-05Rework how fib_priority is handled.Claudio Jeker
Instead of passing it around all the time put the fib_priority into the kroute state. It is only needed in send_rtmsg() in the end. Additionally insert F_BGP_INSERTED routes with a special RTP_MINE priority. This makes changing the fib_priority at runtime simpler because there is no need to alter the kroute table anymore. OK tb@ deraadt@