summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2023-04-25tiny markup fix: add missing Ic before `group' in the `agentx' ruleOmar Polo
OK martijn@
2023-04-25vmctl(8): no longer needs vmmvar.hDave Voutila
Finally! We can remove kernel headers from vmctl. ok mlarkin@
2023-04-25vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct.Dave Voutila
The object sent to vmm(4) contained file paths and details the kernel does not need for cpu virtualization as device emulation is in userland. Effectively, "pull up" the struct members from the vm_create_params struct to the parent vmop_create_params struct. This allows us to clean up some of vmd(8) and simplify things for switching to having vmctl(8) open the "kernel" file (SeaBIOS, bsd.rd, etc.) to allow users to boot recovery ramdisk kernels. ok mlarkin@
2023-04-25Add option 'rdroot' to simplify creation of rdroot filesystems for the installKenneth R Westerback
media. No functional change to existing behaviour.
2023-04-24If the two mfts in mft_compare() are the same do not prefer theClaudio Jeker
first (DIR_VALID) but perfer the 2nd (DIR_TEMP) since this allows rpki-client to move the equal files from .rrdp back into the valid repo tree and so there are less unaccounted files for. Problem noticed by and OK job@
2023-04-24Missing the optional default config is not an errorKlemens Nanni
/var/log/{messages,daemon} logs ENOENT as error on default configless vmd. Only complain on explicitly passed files and print a debug hint under `-vv' in case someone forgot to populate their /etc/vm.conf. OK dv mlarkin
2023-04-24"ls rogue" needs root; OK ajaKlemens Nanni
2023-04-24Add '-s' option to simply display the number of bytes available for the rdrootKenneth R Westerback
filesystem in the specified kernel. No behaviour change to existing uses of rdsetroot. Improved option handling & ok kn@
2023-04-23In filemode, if an ASPA contains information for only 1 AFI, supplement the ↵Job Snijders
other OK claudio@
2023-04-23vmd(8): teach vmm process how to exec.Dave Voutila
Use execvp(2) to launch vm children with new address spaces. Consequently, introduces use of unveil(2) into the vmm and vm processes. This imposes the requirement of launching vmd with absolute paths, similar to sshd(8). ok mlarkin@
2023-04-23Flowspec show support an address family argument. Copy the descriptionClaudio Jeker
from the very similar 'network show'.
2023-04-23For FLOWSPEC_SHOW conver the AID form regular inet/inet6 to flowspec versions.Claudio Jeker
OK tb@
2023-04-23Add the same AID filter to prefix_flowspec_dump() like in the otherClaudio Jeker
prefix/rib dump functions. OK tb@
2023-04-23Document flowspec commandsClaudio Jeker
OK tb@ jmc@
2023-04-23unbreak tree by coping with recent s/XCR0/XFEATURE renameAnton Lindqvist
2023-04-22vmd(8): fix vm send/receive due to invalid hva's.Dave Voutila
Moving some of the virtio devices to zero-copy approaches required tracking the host-side virtual address for the gpa of virtqueues. Upon a send/receive they are invalid as the restoring system will most likely use a different address space layout. Recompute the hva's on receive and NULL them on send. ok mlarkin@
2023-04-21Adjust ext community handling to support the generic transitive communitiesClaudio Jeker
introduced with flowspec. OK tb@
2023-04-21Missing space noticed by Pablo Mendez HernandezClaudio Jeker
2023-04-21Sync common code with bgpctl with the version from there.Claudio Jeker
OK tb@
2023-04-21Implement flowspec add and delete to add/remove flowspec rules dynamically.Claudio Jeker
OK tb@
2023-04-20Rework the way transit provider AID masks are built and sent to the RDE.Claudio Jeker
ASPA provider AS sets can include optional limitations to inet/inet6 these limits are represented in the TAS_AID bit masks (2bits per AS). Introduce a TAS_AID_SIZE() makro that returns the size in bytes of this bit mask (rounded to the next uint32_t). Without this change aspa objects with AID specific elements trigger a fatal error condition when the config is loaded. OK tb@ job@
2023-04-20Consistent casingJob Snijders
2023-04-20ASPAs solely containing providers limited to one AFI, imply AS 0 for the ↵Job Snijders
other AFI OK claudio@
2023-04-20Implement bgpctl show flowspec and bgpctl flowspec flush.Claudio Jeker
This uses the flowspec.c file from bgpd and implements the output for flowspec only for the text printer for now. That code uses a lot of code from printconf.c OK tb@
2023-04-20Implement IMSG_CTL_SHOW_FLOWSPEC and IMSG_FLOWSPEC_FLUSH and add bits forClaudio Jeker
IMSG_FLOWSPEC_ADD and IMSG_FLOWSPEC_REMOVE received from bgpctl via SE. OK tb@
2023-04-20Document flowspec in bgpd.conf.5Claudio Jeker
Input and OK jmc@ tb@
2023-04-19Fix missing whitespace in bgpd(8) outputJob Snijders
2023-04-19Force a standard umask before adding/deleting packages. If not done andStuart Henderson
the user has a restrictive mask, various items (new directories, @sample'd files, /var/db/pkg entries, mandoc databases) end up not readable. feedback/ok espie@
2023-04-19Reshuffle the flowrule yacc rules to be in a more logical and alphabeticalClaudio Jeker
order.
2023-04-19remove duplicate includesJonathan Gray
2023-04-19Implement a way to announce flowspec rules without hitting Adj-RIB-InClaudio Jeker
and Loc-RIB. Flowspec objects are collected in a single flowrib RIB and then directly distributed into the various Adj-RIB-Outs. For this to work add a bypass in the filter logic (flowspec AFI/SAFI are currently accepted without any rule). The filter language lacks a way to allow prefixes based on AFI/SAFI which is the minimum needed. OK tb@
2023-04-19remove duplicate includesJonathan Gray
2023-04-19Remove usage of fatalx() in here. This code will be shared with bgpctl.Claudio Jeker
In flowspec_cmp() make sure a deterministic sort is possible. Most error cases are unreachable if flowspec NLRI are validated first (flowspec_valid). In flowspec_valid() replace the assert like check with an error return. OK tb@
2023-04-19Add minimal support for flowspec in the table-mp MRT format.Claudio Jeker
In general people should use table-v2 which handles flowspec just fine. OK tb@
2023-04-19Add handling for flowspec in the update path.Claudio Jeker
Flowspec has no nexthop so adjust up_prep_adjout() to handle a NULL nexthop. Add the MP_REACH encoding in up_generate_mp_reach for flowspec. OK tb@
2023-04-19Implement code to pass the flowspec config over to the RDE. The parentClaudio Jeker
process tracks which prefixes are added / removed and issues the corresponding imsg calls. Right now the RDE does nothing with the received information. OK tb@
2023-04-19Extend the pt_entry api to handle flowspec.Claudio Jeker
Introduce pt_get_flow() and pt_add_flow() to lookup and insert flowspec objects. Add pt_getflowspec() which works somewhat similar to pt_getaddr() to extract the flowspec NLRI from a pt_entry. Make pt_getaddr() to return the destination prefix of the flowspec rule and handle flowspec in pt_write(). OK tb@
2023-04-19bad indentsClaudio Jeker
2023-04-18Implement a basic flowspec print function. It is not 100% compatibleClaudio Jeker
with the parser but that is for a later time to fix. OK tb@
2023-04-18Rewrite some ugly for loopsTheo Buehler
This fixes a few KNF issues and ugly line wrapping by using a local version of nitems(); fix two bsearch() on top. ok claudio
2023-04-18Implement the parser bits to process flowspec rules. Heavily inspired byClaudio Jeker
pfctl, in bgpd flowspec rules are written like pf rules (with a few exceptions / extensions). As a result not all flowspec features are available but that is OK. OK tb@
2023-04-18I somehow overlooked four more missing void...Theo Buehler
2023-04-17Reverse the polarity of flowspec_cmp() so it works better with ourClaudio Jeker
RB trees. Mainly RB_FOREACH() walks form RB_MIN to RB_MAX so the most preferred entry should be at RB_MIN. OK tb@
2023-04-17Convert all users of parse_number() to also process the next elementClaudio Jeker
like it was done for communities. Again a fair amount of token tables disappear. OK tb@
2023-04-17In parse_prefix and parse_addr only touch the addr if the functions isClaudio Jeker
successful. Do not clear it all the time since that breaks the ANYTOKEN fallback since it resets the just set address on the next argument. OK tb@
2023-04-17Passing argv as tripple indirect pointer to match_token() is just strange.Claudio Jeker
Instead pass argc and argv as value and return the consumed number of arguments in argsused (normally 1). OK tb@
2023-04-17Rework how communities are parsed. Use tha fact that argv and argc areClaudio Jeker
available inside match_token() and peek and consume argv[1] and for ext-communities also argv[2]. OK tb@
2023-04-17Implement a basic API to work with flowspec NLRI.Claudio Jeker
Flowspec is excessivly flexible and large so there is no way to convert the flowspec data into a struct bgpd_addr and it is better to keep it in wireformat and add a few functions to validate and extract information from the NLRI encoding. OK tb@
2023-04-16if (actually... when) the compiler is flipped to do BTI/ENDBR by default,Theo de Raadt
the install media would grow too much, so use the same strategy as we for stack protector and other things: disable them, just on the install media ok kettenis
2023-04-16Fix (and simplify) link speed reporting.Mark Kettenis
ok jsg@