summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2023-10-17Neither sin_len nor sin6_len can be 0 so these checks are not needed.Claudio Jeker
Also reorder the RTF_HOST vs netmask check. RTF_HOST wins if both are set. Makes the code a bit neater. OK tb@
2023-10-17Remove bogus plen != 0xff checkClaudio Jeker
OK tb@
2023-10-16Improve IPv6 link-local address handlingClaudio Jeker
When a session is established determine the possible interface scope of that session. The scope is only set when the remote address is directly connected. This interface scope is passed to the RDE that uses this information when link-local nexthops are received. Again checking that a link-local nexthop is actually acceptable. OK tb@
2023-10-14Verify but don't overwrite SHA256.sig in fw_update(8)Andrew Fresh
Signify is happy to overwite the file with the signature stripped off. However, if we do that, when downloading firmware we lose the ability to check the signature before verifying checksums on the downloaded files. Noticed by Thomas <exnihilo () fastmail ! org> Right deraadt@
2023-10-14Rewrite log_peer_info() and log_peer_warn[x]()Claudio Jeker
Passing the peer description as part of the format string was a bad idea since the peer description may include some % signs (e.g. for link local IPv6 addresses). So instead of asprintf a new fmt string use vasprintf to get the message and then use logit("%s: %s", peer_info, msg). OK tb@
2023-10-13Allow imposing constraints on RPKI trust anchorsJob Snijders
The ability to constrain a RPKI Trust Anchor's effective signing authority to a limited set of Internet Number Resources allows Relying Parties to enjoy the potential benefits of assuming trust, within a bounded scope. Some examples: ARIN does not support inter-RIR IPv6 transfers, so it wouldn't make any sense to see a ROA subordinate to ARIN's trust anchor covering RIPE-managed IPv6 space. Conversely, it wouldn't make sense to observe a ROA covering ARIN-managed IPv6 space under APNIC's, LACNIC's, or RIPE's trust anchor - even if a derived trust arc (a cryptographically valid certificate path) existed. Along these same lines, AFRINIC doesn't support inter-RIR transfers of any kind, and none of the RIRs have authority over private resources like 10.0.0.0/8 and 2001:db8::/32. For more background see: https://datatracker.ietf.org/doc/draft-snijders-constraining-rpki-trust-anchors/ https://mailman.nanog.org/pipermail/nanog/2023-September/223354.html With and OK tb@, OK claudio@
2023-10-13Add missing Ns in argument list of announce (IPv4|IPv6) ...Claudio Jeker
2023-10-12Retry DNS lookup for remote loghost.Alexander Bluhm
If DNS lookup for a remote loghost configured in syslog.conf did not work at startup, the entry was ignored. Better retry the lookup in intervals until it succeeds. Improve debug output to print IP address after resolution. Unify retry code that resolves DNS for UDP and connects to TCP server. testing and feedback from Paul de Weerd; OK deraadt@
2023-10-12bt(5), btrace(8): add support for binary modulo operator ('%')Scott Soule Cheloha
Link: https://marc.info/?l=openbsd-tech&m=169695435209410&w=2 ok mpi@
2023-10-12Before calling rde_generate_updates() with EVAL_ALL ensure that the newClaudio Jeker
path is actually eligible. If this is not the case pass NULL instead. This is an optimisation to bypass extra work if both old and new path were ineligible. OK tb@
2023-10-12In up_generate_addpath_all() ensure that the new prefix is valid.Claudio Jeker
This should fix a fatal error reported by Arend Brouwer (arend at eritap com) when "announce add-path send all" is used. As a workaround "announce add-path send best plus 500" can used. OK tb@
2023-10-12Remove default sets answerKlemens Nanni
The autoinstall(8) response file contains only non-defaults, except for Set name(s)? (or 'abort' or 'done') [done] done which is the hardcoded default since 2009. Added in 2019 r1.23 "Let sysupgrade(8) create auto_upgrade.conf file [...]" with all others, remove the exception. OK florian
2023-10-11put "stub" within grasp of -DREGRESSION_TESTING.Marc Espie
Extend it slightly: do not stub quirks, so that caching mechanisms work as usual even when using stubs.
2023-10-11missing state in locator call, surprised nobody else ran into thatMarc Espie
2023-10-11Bump version for -portable releaseClaudio Jeker
2023-10-10When rewriting community_writebuf() the handling of non-transitiveClaudio Jeker
ext-communities was put into the wrong place in the loop finding start, end and number of communities to dump. As a result the end pointer for regular communities can point at an ext-community and with that the COMMUNITY attribute written includes unexpected extra bytes. This in turn causes the peer to send a NOTIFICATION error and to terminate the session. Fix for -portable issue #64 reported by Pier Carlo Chiodi (pierky) OK tb@
2023-10-09Add Message-Id as needed for messages received on the submission port.Todd C. Miller
Since listener->port is in network byte order we need to compare against htons(587). The fix for this got dropped in the rewrite in revision 1.335.
2023-10-09placeholder for later featureMarc Espie
2023-10-09Fix return value confusion of sa_cmp() by renaming the function sa_equal().Claudio Jeker
The code in get_alternate_addr() checked for sa_cmp() == 0 but actually sa_cmp() returned 1 for equal addrs. So rename the function to sa_equal() to make it clear that a true return value means equality. Found by Asa Yeamans (enigma2e at rivin net) OK tb@
2023-10-09simplify: all 3 mock-ups are strings that get eval'd, so do this properly.Marc Espie
2023-10-08subclass system libraries so we can give better diagnostic eventuallyMarc Espie
2023-10-08oops, those eval need to be STRINGS, otherwise the whole definition stuffMarc Espie
happens regardless. Add a third one to only disregard base libraries
2023-10-08add another two regression testing parts. Use a simple framework thatMarc Espie
allows me to redefine methods to not do a thing (maybe this will migrate to its own file if it grows enough)
2023-10-08wrong prototype, it's called as an OO methodMarc Espie
2023-10-08plain forgot to save the values for regression testingMarc Espie
2023-10-07with firmware known, recognize that we couldn't find any update at allMarc Espie
and just say that instead of a dauntingly long list of packages
2023-10-07track firmware separately, since those will appear as uptodate for usMarc Espie
2023-10-07use more specific regression testing knobMarc Espie
2023-10-06add -v to usage();Jason McIntyre
2023-10-05Do log output to stderr while running dhcpd(8) in foreground to makeVitaliy Makkoveev
behaviour in accordance with man page. Introduce '-v' option to make output more verbose. Do a little refactoring to make code more consistent with other daemons like ospfd(8), httpd(8), relayd(8), etc. Feedback from bluhm benno ok bluhm
2023-10-02bump versionClaudio Jeker
2023-09-29bump version to 7.4.0Omar Polo
2023-09-28Prep for OpenBGPD 8.2Claudio Jeker
2023-09-28Enforce NUL termination of the neighbor shutdown reason sent fromClaudio Jeker
bgpctl before calling strlcpy() with that string. OK tb@ some long time ago
2023-09-28Don't register firmware already in /var/db/pkgAndrew Fresh
If installing firmware with `make install` from a port, it doesn't register properly by adding "@option firmware" to the packing list, this means we ignore that it is installed and reinstall it over and over with the registration ending up in a tmpdir named directory inside the existing directory in /var/db/pkg. Unfortunately I don't know of a good way to automatically clean up from that, so we just print a message after installing the actual firmware. Reported by job@ No complaints about the patch on tech@ for several weeks.
2023-09-28Exit successfully at the end of fw_updateAndrew Fresh
Otherwise the exit status depends on whether we kept any firmware. Reported by Brian Conway <bconway () rcesoftware ! com> The clean solution suggested by guenther@
2023-09-28Download firmware to LOCALSRC when using filenamesAndrew Fresh
Previously if you did: fw_update otus-firmware-1.0p1.tgz and that firmware didn't exist in the current directory, we would download that firmware into the current directory. Which is not the expected outcome.
2023-09-26vmd(8): disambiguate log messages per vm and device.Dave Voutila
The logging output from vmd(8) often specifies the function performing the logging, but leaves which vm or vm device to guesswork and reading tea leaves. Change the logging formatting to prefix with information about the specific vm and potentially the device subprocess. Most of this logging is behind the "verbose" mode, but for warnings this will clarify which vm or device logged the warning. The format of vm/<name>/<device><index> is chosen to be concise and less ugly than other approaches. This adjusts the process naming for devices to match, dropping the use of brackets. In the process of this change, updating log settings dynamically via vmctl(8) is fixed by properly broadcasting that information to the device subprocesses. The "vmm" process also now updates its own state properly, so settings survive vm reboots. ok mlarkin@
2023-09-26vmd(8): fix vm pause deadlock.Dave Voutila
When vcpu threads pause, they are holding the run mutex lock. If the event thread is asked to assert an irq on the pic and interrupts are pending, it will try to take the run mutex lock on the vcpu. This deadlocks. Release the lock in the vcpu thread before waiting on the pause condition variable. ok mlarkin@
2023-09-25rpki-client: mechanical rename of some variablesTheo Buehler
The previous commit used suboptimal variable names for ease of review. Fix this up now. ok claudio
2023-09-25rpki-client: Refactor sbgp_assysnum() and sbgp_addrblk()Theo Buehler
An upcoming diff requires the ability to convert ASIdentifiers and IpAddrBlocks into rpki-client's internal structures. Accordingly, split already existing code into dedicated parsing functions . The original functions now only extract the extension-specific data from the X509_EXTENSION. input/ok claudio
2023-09-25Pass the talid to various parse functionsTheo Buehler
This will be needed by an upcoming feature where we will need to know what trust anchor a given cert chains to. This doesn't change anything except the size of the diff. ok claudio job
2023-09-25Introduce ip_addr_range_print() to avoid code repetitionJob Snijders
OK tb@
2023-09-23vmd(8): correct log messages, no functional change.Dave Voutila
Some log messages incorrectly said "vionet" or "vioblk". Fix based on the context.
2023-09-23vmd(8): log vmd's vm id, not vmm's in vcpu_run_loop.Dave Voutila
Some guests cause a warning message during a shutdown. Log the vmd vm id and not the kernel vmm id as it's next to useless to the end user. This has annoyed me too much.
2023-09-16forgot to kill thatMarc Espie
2023-09-15Also update usage() to include [-p file].Claudio Jeker
2023-09-15Even if support for utsack is very limited, document the option needed.Claudio Jeker
OK mpi@
2023-09-14satisfy non-c99 compilersTheo de Raadt
2023-09-14Instead of ld -dc use ld -d, supported by both ld.bfd and ld.lld >= 15Jeremie Courreges-Anglas
Upstream LLVM decided to drop the -dc flag and keep its -d alias for some time: https://github.com/llvm/llvm-project/commit/0688b00fc39fe87ec6dd3d37a732d067ff487f16 So this is only a workaround to let us update llvm to a recent release. We'll probably need another fix not so distant future. Another approach would be to just drop -dc from the linker invocation, and use cc -fno-common when building instbin with base-gcc (already the default with base-clang). But this approach needs more testing than I can provide, as deraadt@ feared it would break in subtle ways. ld -d compat alias pointed out by robert@, ok robert@