Automatically detect IPv6 support and test IPv6 parsing if found.
This should always be enabled on OpenBSD, but allows us to use the same
test in Portable without modifications that make syncs harder.
Factor out all of the IPv6 addresses into variables. This lets us skip them
in Portable on platforms that don't support IPv6 all in one place, removing
diffs from within the tests themselves and making syncs easier.
getty(8): IXANY is an input flag, not a local flag
The dx gettytab capability was a no-op, fix this so the capability behaves
as intended.
Original fix was submitted by Piotr Durlej in 2024. We applied half of
that fix at the time. Now apply the other half of the originally submitted
fix.
ok millert@
If a session drops from add-path send to no add-path send then the
adj-rib-out needs extra cleanup in up_generate_updates().
In the EVAL_SYNC case up_generate_updates() should check if the
adjout_prefix (p) returned was for an add-path path. This is the case if
path_id_tx is not 0. In that case withdraw all paths before calling
up_process_prefix().
The add-path side already does this by default.
OK tb@
vmd(8): check for under reads/writes when copying qcow2 clusters.
Report and original diff by Andrew Griffiths. Corrected to handle
logging when errno was not set by pread(2)/pwrite(2).
ok hshoexer@, mlarkin@, bluhm@
Set flags for Power ISA 2.06, 2.07, isel, and vec crypto
These are for elf_aux_info(3) AT_HWCAP or AT_HWCAP2. The vec crypto
flag is for accelerating AES and SHA-2. Some ports check these flags,
or will check them if they get patched to call elf_aux_info.
Define PPC_FEATURE2_VEC_CRYPTO with the same value as
PPC_FEATURE2_HAS_VEC_CRYPTO, because I have seen code using the name
without HAS.
ok kettenis@
netinet6: keep negotiated IPv6CP IFID unchanged for link-local address
When sppp/PPPoE installs a peer-suggested IPv6CP interface identifier,
in6_ifattach_linklocal() forced EUI64 G/U bit adjustments on the
provided IFID. This unconditionally set the universal bit, rewriting a
valid negotiated IFID like ::1 into ::200:0:0:1, yielding
fe80::200:0:0:1 instead of fe80::1.
RFC 5072 Section 5 specifies that the PPP link-local address is formed
using the negotiated Interface Identifier as-is. Skip EUI64 bit
modification on point-to-point interfaces. Non-P2P callers retain
existing behaviour, while callers passing NULL continue using
in6_get_ifid().
Reported by Martin Crossley <admin AT crossleys DOT biz>.
OK stsp@
Fix possible exit race in the parser
Call pthread_cond_broadcast() on exit with its mutex held to ensure
that the receiving threads are all either parked or running and then
checking quit before calling pthread_cond_wait().
Also once woken recheck the value of quit and exit the main loop early.
OK tb@
DNS names are not proper C strings, they can contain NUL octets.
If we want to use string functions (e.g. for comparison) we first need
to convert them.
with dgl some time ago
OK dlg
Rework the IdleHoldTimer and how fast reconnects are implemented.
On first error bgpd should allow a fast reconnect - this is especially
helpful for passive sessions. The way this was implemented was error
prone with a special case in session_accept().
Adjust the FSM so that on the first IDLE transistion the session uses
a IdleHoldTime of 0 sec but then increased to INTERVAL_IDLE_HOLD_INITIAL.
At the same time the outgoing connection is delatyed via ConnectRetryTimer.
Doing this moves the session quickly into active state and allows new
connections in but delays the reconnect like before.
Additionally the STATE_ACTIVE / EVNT_START FSM case is adjusted to initiate
a connect immediatly. This allows a 'bgpctl nei X up' to work also for
sessions in ACTIVE state. Also passive sessions will initiate a connection
in this case, which is a new behaviour.
OK tb@
Use peer_dump_done() in the EXPORT_NONE and EXPORT_DEFAULT_ROUTE cases of
peer_dump().
peer_dump_done() calls peer_blast_done() and it issues the End-Of-RIB
marker. This unifies all the peer_dump finalizers to use peer_dump_done().
OK tb@
Switch a few uint32_t to unsigned int where it makes sense.
Instead of mixing uint32_t with unsigned long long use unsigned int for
those. In most cases those are simple counts that can't get too big.
The same is the case for max_prefix and max_out_prefix. There is no good
reason to use uint32_t there.
OK tb@
Don't use SCSI_DATA_IN for patrol read commands that don't have a data
buffer. Noticed while looking into crashes reported by job@ but doesn't
fix anything.
ok dlg@