summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
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@
2023-04-16vmd(8): correct comment in vioraw, cleanup formatting.Dave Voutila
Comment incorrectly mentioned returning sectors when this function returns bytes; the logic in virtio.c computes the number of 512 byte sectors after calling virtio_raw_init. While here, adjust the formatting of return's to match the rest of vmd. No functional change.
2023-04-16vmd(8): clean up fd closing in vmm process.Dave Voutila
Some mild tidying of fd closing in the vmm process in prep for landing parts of my fork+exec diff. With input from guenther@ on the nuances of if/when EINTR may happen in a call to close(2). ok mlarkin@
2023-04-15Introduce an ANYTOKEN token which can be used instead of NOTOKEN to allowClaudio Jeker
to fall back to another table if no other element in the current table matched. ANYTOKEN needs to be the last element in a table. With this 'bgpctl show rib 192.0.2.1 detail' works. OK tb@
2023-04-15Disallow issuer and subject unique identifiersJob Snijders
In 1992, the ITU-T - through X.509 version 2 - introduced subject and issuer unique identifier fields to handle the possibility of reuse of subject and/or issuer names over time. However, the standing recommendation is that names not be reused for different entities and that Internet certificates not make use of unique identifiers. Conforming RPKI CAs will never issue certificates with unique identifiers. OK tb@ claudio@
2023-04-14Add two missing void to appease clang 15Theo Buehler
There is another thing clang 15 is whining about - this will be resolved in upcoming work by dv. ok dv
2023-04-14A tab snuck inTheo Buehler
2023-04-13Check whether products listed on a manifest were issued by the same ↵Job Snijders
authority as the manifest itself OK tb@
2023-04-13Simplify how IMSG_CTL_SHOW_RIB_COMMUNITIES is constructed. This can justClaudio Jeker
call imsg_compose() and be done with it. OK tb@
2023-04-13Sort commands alphabetically both in the tables and manpage.Claudio Jeker
OK tb@
2023-04-12bgpctl network bulk requires now the specification of 'add' or 'delete'.Claudio Jeker
In the add case the extra attributes can be specified afterwards. This makes the parser behave cleaner since 'add' and 'delete' are removed from the attribute set table. OK tb@
2023-04-12remove duplicate linesJonathan Gray
2023-04-12Align printing of geofeed records in filemodeJob Snijders
2023-04-07Pass a pt_entry pointer to rib_get() and rib_add().Claudio Jeker
Add rib_get_addr() to behave like rib_get() did before. OK tb@
2023-04-05If ndp -d did not find a neigbor entry, it removed the cloning routeAlexander Bluhm
instead. Comparing the arp(8) and ndp(8) code shows that the latter has a fallthrough to delete. Return an error also in this case. OK kn@
2023-04-05Refactor port definitions to also support service names like bgp.Claudio Jeker
OK tb@
2023-04-05Rename family with af to follow pfctl/parse.y a bit more.Claudio Jeker
OK tb@