dtucker [Tue, 1 Jun 2021 23:56:20 +0000 (23:56 +0000)]
Use a default value for $OPENSSL, allowing it to be overridden.
Do the same in the PuTTY tests since it's needed there and not exported
by test-exec.sh.
krw [Tue, 1 Jun 2021 22:54:43 +0000 (22:54 +0000)]
Make spoofed disklabel boundstart and boundend default to the bounds
of the usable LBA range defined by the GPT header. And then shrink
them to the bounds of the first OpenBSD partition if one is found.
While here simplify the logic, eliminate some superfluous variables
and reduce use of magic numbers.
Improvement suggested by sobrado@ ok kettenis@
guenther [Tue, 1 Jun 2021 21:12:11 +0000 (21:12 +0000)]
Don't clear the cpu's bit in the old pmap's pm_cpus until we're off
the old one and set it in the new pmap's pm_cpus before loading
%cr3 with the new value. In particular, do neither if %cr3 isn't
changing.
This eliminates a window where, when switching between threads in
a single a process, the pmap wouldn't have this cpu's bit set even
though we didn't change %cr3. With more of uvm unlocked, it was
possible for another cpu to update the page tables but not see a
need to send an IPI to this cpu, leading to crashes when TLB entries
that should have been invalidated were used.
malloc_duel testing by abluhm@
ok abluhm@ kettenis@ mlarkin@
tobhe [Tue, 1 Jun 2021 20:57:12 +0000 (20:57 +0000)]
Remember flow routes in addition to host routes and delete
them explicitly on shutdown. Store netmask in route queue
to fix cleanup of 0/1 routes. Sending delete messages
without mask doesn't work reliably.
ok patrick@
tb [Tue, 1 Jun 2021 20:26:11 +0000 (20:26 +0000)]
Update RFC reference. RFC 4366 was obsoleted by RFC 6066.
tb [Tue, 1 Jun 2021 20:14:17 +0000 (20:14 +0000)]
Avoid sending a trailing dot in SNI as a client
While an FQDN includes a trailing dot for the zero-length label of
the root, SNI explicitly does not contain it. Contrary to other TLS
implementations, our tlsext_sni_is_valid_hostname() rejects a trailing
dot. The result is that LibreSSL TLS servers encountering an SNI with
trailing dot abort the connection with an illegal_parameter alert.
This fixes an issue reported by danj in nc(1) and by sthen in ftp(1).
DNS cluebat from florian.
ok jsing
tb [Tue, 1 Jun 2021 19:49:17 +0000 (19:49 +0000)]
Remove unnecessary cast in free.
ok jsing
stsp [Tue, 1 Jun 2021 18:03:56 +0000 (18:03 +0000)]
Revert iwm(4) firmware updates for now; robert@ reports stalled Tx on 9260
mvs [Tue, 1 Jun 2021 14:23:34 +0000 (14:23 +0000)]
Check `so_state' in rtm_senddesync() and return if SS_ISCONNECTED or
SS_CANTRCVMORE bits are set.
The first check required to prevent timeout_add(9) reschedule
`rop_timeout', otherwise timeout_del_barrier(9) can't help us.
The second check is for the case when shutdown(2) with SHUT_RD argument
occurred on this socket and we should not receive anything include
RTM_DESYNC packets.
ok claudio@
stsp [Tue, 1 Jun 2021 13:21:08 +0000 (13:21 +0000)]
Switch iwm(4) to new firmware images available in iwm-firmware-
20210512.
This updates firmware for 3165, 3168, 7265, 8260, 8265, 9260, 9560 devices.
Other devices did not receive firmware updates from Intel.
New firmware images should contain revelant fixes for fragattacks:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00473.html
Running fw_update(1) may be required before rebooting into a new kernel.
sysupgrade(8) will take care of this.
When reporting issues (I am sure there will be new "fatal firmware errors"
for some people) please enable 'ifconfig iwm0 debug', reproduce the error
once more, and include the full dmesg in your bug report.
Important changes required for new firmware:
- Support new variants of several existing firmware commands just
because Intel loves adding new features and changing the commands.
- Implement the 'clear persistence bit' workaround for 9k devices to
avoid potential issues during suspend/resume.
- Recognize Mobile Country Code update notifications for the regulatory
domain, like iwx(4) does.
- Handle PHY context updates more like the Linux iwlwifi driver does.
Some devices need an add/remove dance if the band has changed.
- For 9560, configure SoC latency parameters after booting firmware.
- Handle critical temperature notifications by shutting the device down.
- Use only antenna B for single-antenna Tx on 9k devices (matches what
Linux and FreeBSD do; Likely only matters if Bluetooth is active, but
who knows, Git logs and comments are the only documentation we have).
Other small fixes:
- Fix various scan command parameters. Some fixes were taken from iwx(4).
- Don't send probe requests when scanning passive channels. Experimentation
has shown that this will make 9k devices crash after associating to an AP.
This same fix does not seem to work on iwx(4) devices, where active scan
is disabled for the same reason, and it is not yet clear why.
- Fix firmware reloading after parsing the firmware image has failed.
- Flushing Tx rings will fail if the AP disappears. Don't make any noise
about that in dmesg, instead gracefully reset the device and continue.
Tested:
7260: florian
3168: kevlo
7265: stsp, mlarkin
8260: bket
8265: stsp, benno
9560: stsp, steven
mvs [Tue, 1 Jun 2021 13:13:10 +0000 (13:13 +0000)]
Introduce the new test which enforces unp_gc() run and close
unreferenced descriptors.
ok bluhm@
stsp [Tue, 1 Jun 2021 12:33:54 +0000 (12:33 +0000)]
Fix iwx(4) firmware reloading after a failure to parse the firmware file.
Noticed by Peter N. M. Hansteen
This issue will also be fixed in iwm(4) soon, along with a firmware update.
dlg [Tue, 1 Jun 2021 09:57:11 +0000 (09:57 +0000)]
a couple of minor whitespace tweaks. no functional change.
am i a pf hacker now?
jsg [Tue, 1 Jun 2021 02:59:01 +0000 (02:59 +0000)]
amd64 U-Boot arch code should be ARCH_X86_64 not ARCH_IA64
jsg [Tue, 1 Jun 2021 02:13:15 +0000 (02:13 +0000)]
list aarch64 as a valid arch
from Leon Fischer
deraadt [Tue, 1 Jun 2021 01:43:59 +0000 (01:43 +0000)]
sync
mglocker [Mon, 31 May 2021 21:06:48 +0000 (21:06 +0000)]
Change the behavior of the UVIDEO_FLAG_REATTACH flag to attach an
unsupported device to uvideo(4), but not to video(1), instead of just
keeping it unmatched. Also uvideo(4) will print a message about the
device not being supported.
ok mpi@
millert [Mon, 31 May 2021 19:54:04 +0000 (19:54 +0000)]
auth_call(3) no longer uses secure_path(3)
This updates the manual to match the change made in 2019.
OK deraadt@
jcs [Mon, 31 May 2021 18:30:11 +0000 (18:30 +0000)]
add an -R flag to dump the raw report descriptor bytes for parsing
with other tools
man page help from jmc
ok anton
tb [Mon, 31 May 2021 17:39:24 +0000 (17:39 +0000)]
Revert previous. bluhm noted that it causes a regress failure.
tobhe [Mon, 31 May 2021 17:10:14 +0000 (17:10 +0000)]
Don't fail hard in ikev2_cp_fixaddr() if no address pool is found.
Fixes a bug where no flows are loaded when a single config address without
pool is configured.
ok patrick@
bluhm [Mon, 31 May 2021 16:56:27 +0000 (16:56 +0000)]
Since our unix receive queue got longer, the test run-t_sendrecv
did not terminate anymore on some machines. The test counts 100
send errors before it finishes. NetBSD has added sched_yield() in
the receiver loop to trigger the errors on the sender side. Although
not perfect, it works for me. Get current t_sendrecv.c from NetBSD.
tobhe [Mon, 31 May 2021 16:54:45 +0000 (16:54 +0000)]
Prevent address underflow with /32 config address prefix.
Only skip .0 address if the pool is big enough.
ok patrick@
jan [Mon, 31 May 2021 16:18:01 +0000 (16:18 +0000)]
Convert K&R function definitions to modern C.
OK naddy@, millert@
jsg [Mon, 31 May 2021 13:44:04 +0000 (13:44 +0000)]
call drmbackoff() on powerpc64 as well
ok kettenis@
visa [Mon, 31 May 2021 12:45:33 +0000 (12:45 +0000)]
Redefine ADJFREQ_MIN to avoid undefined behaviour (when not using -fwrapv)
Change the definition of ADJFREQ_MIN so that it does not shift
a negative value. Such shifting is undefined in standard C.
This came up when cross-compiling the kernel using ports clang.
The shifting becomes defined when compiling with option -fwrapv.
Base clang enables this option by default.
OK naddy@ cheloha@
stsp [Mon, 31 May 2021 08:43:07 +0000 (08:43 +0000)]
Avoid "mac clock not ready" panic in iwx(4).
The same change was just made in iwm(4):
The point of iwm_nic_assert_locked() is to verify that iwm_nic_lock() has
been called somewhere up in the call stack. Checking our own lock counter
is sufficient for this purpose.
If locking the device worked then these registers had the expected state at
that time and our lock counter was incremented. Apparently if the device runs
into some issue later the state of these registers may change and trigger
these panics. Instead we want to handle such failures gracefully and reset
the device.
problem reported by steven@
ok kettenis@
stsp [Mon, 31 May 2021 08:40:41 +0000 (08:40 +0000)]
Avoid "mac clock not ready" panic in iwm(4).
The point of iwm_nic_assert_locked() is to verify that iwm_nic_lock() has
been called somewhere up in the call stack. Checking our own lock counter
is sufficient for this purpose.
If locking the device worked then these registers had the expected state at
that time and our lock counter was incremented. Apparently if the device runs
into some issue later the state of these registers may change and trigger
these panics. Instead we want to handle such failures gracefully and reset
the device.
problem reported by steven@
ok kettenis@
djm [Mon, 31 May 2021 06:48:42 +0000 (06:48 +0000)]
Hash challenge supplied by client during FIDO key enrollment prior to
passing it to libfido2, which does expect a hash.
There is no effect for users who are simply generating FIDO keys using
ssh-keygen - by default we generate a random 256 bit challenge, but
people building attestation workflows around our tools should now have
a more consistent experience (esp. fewer failures when they fail to
guess the magic 32-byte challenge length requirement).
ok markus@
dlg [Mon, 31 May 2021 04:48:35 +0000 (04:48 +0000)]
make nvme_read8 and write8 less clever.
hopefully big endian still works.
dlg [Mon, 31 May 2021 04:13:42 +0000 (04:13 +0000)]
try to get rid of a weird comma on the alpns attach line.
"makes sense" jmatthew@
bluhm [Sun, 30 May 2021 21:01:27 +0000 (21:01 +0000)]
Declare all struct protosw as constant.
OK mvs@
jcs [Sun, 30 May 2021 19:54:52 +0000 (19:54 +0000)]
add hid_get_report_desc_data() to access the raw report descriptor
data without needing to export the report_desc struct definition.
suggested by and ok anton@
kettenis [Sun, 30 May 2021 19:02:30 +0000 (19:02 +0000)]
Fix overlap check in autoalloc code; ending_sector is the sector after the
OpenBSD area of the disk so it is fine if a "foreign" partition starts at
ending_sector.
ok krw@, otto@
kettenis [Sun, 30 May 2021 18:57:22 +0000 (18:57 +0000)]
Add initial support for installing on a disk with a GPT. Mostly taken from
amd64. This makes the installer recognize an OpenBSD partition such that
the installation will proceed if such a partition is found.
ok krw@, deraadt@
visa [Sun, 30 May 2021 15:08:08 +0000 (15:08 +0000)]
Include <sys/mutex.h> and <sys/queue.h> earlier in powerpc* pmap.h
to avoid hidden header dependencies.
OK jsg@ deraadt@
visa [Sun, 30 May 2021 15:06:53 +0000 (15:06 +0000)]
Include <sys/queue.h> to avoid a hidden header dependency.
OK jsg@ deraadt@
visa [Sun, 30 May 2021 15:05:32 +0000 (15:05 +0000)]
Include <sys/mutex.h> to avoid a hidden header dependency.
OK jsg@ deraadt@
deraadt [Sun, 30 May 2021 13:39:14 +0000 (13:39 +0000)]
sync
jmc [Sun, 30 May 2021 12:26:04 +0000 (12:26 +0000)]
sort SEE ALSO;
jsg [Sun, 30 May 2021 03:18:38 +0000 (03:18 +0000)]
recognise ALC294
jsg [Sun, 30 May 2021 02:54:36 +0000 (02:54 +0000)]
match on Intel 500 Series LP HDA
The ASUS ZenBook S UX393EA HDA device has a multimedia subclass of audio
instead of the expected subclass of HD audio, so add 500 Series LP HDA
to the list of devices.
Fix suggested by and ok brynet@
Reported and tested by Peter N. M. Hansteen
jsg [Sun, 30 May 2021 02:24:43 +0000 (02:24 +0000)]
decode multimedia class
deraadt [Sat, 29 May 2021 13:57:23 +0000 (13:57 +0000)]
sync
bluhm [Sat, 29 May 2021 10:35:56 +0000 (10:35 +0000)]
The cephes test vectors for tanh(3) in our libm fail on most
architectures. On i386 they pass as the 80387 FPU uses 10 byte
numbers internaly. But with standard 8 byte IEEE numbers, the monot
double precision test fails.
Relax the precision requirement for tanh(3), it is good enough.
OK martynas@
kettenis [Sat, 29 May 2021 08:50:07 +0000 (08:50 +0000)]
Enable aplns(4).
kettenis [Sat, 29 May 2021 08:37:53 +0000 (08:37 +0000)]
aplspmi(4) and aplpmu(4)
kettenis [Sat, 29 May 2021 08:10:11 +0000 (08:10 +0000)]
Remove support for the hibernate queue. Allocating this queue would
overwrite the registers pointing at the normal IO queue and break things.
ok dlg@, patrick@
kettenis [Sat, 29 May 2021 08:07:43 +0000 (08:07 +0000)]
Only allocate the "hibernate" queue when HIBERNATE support is being built.
This makes the NVMe storage on the Apple M1 machines actually work!
ok patrick@, dlg@
cheloha [Sat, 29 May 2021 01:32:49 +0000 (01:32 +0000)]
timeout.h: remove API documentation comment
Details about using the timeout API can be found in the timeout.9
manpage. We don't need this comment.
ok mvs@
tobhe [Fri, 28 May 2021 21:09:01 +0000 (21:09 +0000)]
Fix build and disable dhtest for sntrup761x25519. The test assumes a
symmetric KE and does not work with this method.
tb [Fri, 28 May 2021 18:45:09 +0000 (18:45 +0000)]
typo: baring -> barring
tobhe [Fri, 28 May 2021 18:01:39 +0000 (18:01 +0000)]
Add experimental post-quantum hybrid key exchange method
based on Streamlined NTRU Prime (coupled with X25519).
The sntrup761 implementation is imported from OpenSSH.
It is public domain code originally distributed as part
of the SUPERCOP cryptography benchmark suite
(https://bench.cr.yp.to/supercop.html).
The method is not part of the default proposal, but can
be enabled with 'ikesa group sntrup761x25519'.
ok markus@ patrick@
visa [Fri, 28 May 2021 16:33:36 +0000 (16:33 +0000)]
Remove CPU and node id fields that were used with SGI Origin.
visa [Fri, 28 May 2021 16:24:53 +0000 (16:24 +0000)]
Add f_modify and f_process callbacks to socket filterops.
This makes kqueue use the extended callback interface with socket event
filters. Now one level of nested kernel locking is avoided, and the
callbacks run without splhigh().
The filterops no longer check NOTE_SUBMIT, and use a fixed locking
pattern instead. The f_event routines are always called with solock(),
whereas f_modify and f_process are always called without the lock.
OK mpi@
visa [Fri, 28 May 2021 15:52:11 +0000 (15:52 +0000)]
Add cad(4), a driver for Cadence GEM.
This initial revision targets the Zynq-7000, where the GEM implements
single transmit and receive queues with 32-bit DMA addresses. The driver
uses receive checksum offload, but transmit checksum offload is disabled
because of a hardware quirk. Also, the hardware's receive path is prone
to getting stuck if input cannot be handled quickly enough. The driver
attempts to recover by restarting the receiver when no input has been
seen for a while.
OK kettenis@
tb [Fri, 28 May 2021 15:16:43 +0000 (15:16 +0000)]
Silence a clang warning on loss of precision
When converting a long or long long to a double, there may be loss
of precision and clang >= 10 warns about this unless there is a cast.
Add casts to silence this warning - the code is designed to handle
precisely this loss of precision, so this is harmless.
From CheriBSD via FreeBSD
ok millert
patrick [Fri, 28 May 2021 13:08:37 +0000 (13:08 +0000)]
Schedule timeout a little bit sooner. Doing this once every minute isn't
going to hurt, but might save you if you run the machine badly into swap.
Proposed by kettenis@
patrick [Fri, 28 May 2021 13:04:42 +0000 (13:04 +0000)]
Enable imxdog(4)
ok kettenis@
patrick [Fri, 28 May 2021 13:03:55 +0000 (13:03 +0000)]
Once i.MX's watchdog is enabled, it can never be disabled. Some 64-bit
i.MX machines with a recent U-Boot come up with the watchdog enabled, so
we have to regularly ping it to make sure the watchdog doesn't reset us.
The watchdog's timeout can be configured in 0.5s steps to a maximum of
128s. Set it to the maximum, and schedule a timeout which reloads the
counter every 120s.
This only needs to be done if the watchdog is enabled when we boot up.
Tested on Cubox-i (armv7) and MNT Reform (arm64)
ok kettenis@
patrick [Fri, 28 May 2021 12:32:24 +0000 (12:32 +0000)]
imxdog(4)
Reminded by jsg@
patrick [Fri, 28 May 2021 12:30:34 +0000 (12:30 +0000)]
Fix typo in imxesdhc(4)
patrick [Fri, 28 May 2021 11:50:18 +0000 (11:50 +0000)]
Move imxdog(4) to sys/dev/fdt.
ok kettenis@
dlg [Fri, 28 May 2021 04:56:07 +0000 (04:56 +0000)]
kettenis@ pointed out that i forgot to fill in the op_cq_done nvme_op.
dlg [Fri, 28 May 2021 04:49:44 +0000 (04:49 +0000)]
first cut at manpages for aplns(4)
dlg [Fri, 28 May 2021 04:39:54 +0000 (04:39 +0000)]
aplns needs some dmamem per queue for it's iommu.
dlg [Fri, 28 May 2021 04:37:32 +0000 (04:37 +0000)]
commented out lines for aplns(4) for Apple NVME storage controllers.
dlg [Fri, 28 May 2021 04:36:33 +0000 (04:36 +0000)]
start working on support for Apple NVME Storage as found in apple M1 devs
the Apple NVME Storage (aka ans) controller is almost but not quite
a vanilla nvme controller. one difference is that it doesnt attach
to a pci bus, so it needs this custom bus glue. this custom bus
glue also provides us with a nice way to provide a different set
of functions to handle other things that ans does differently to
vanilla nvme controllers.
this is different to how linux deals with ans. the linux support
fakes a pci controller for ans to attach to. i assumed that at some
point a vendor would include nvme in an soc directly and made it a
bus independent driver from day 1. turns out i was right, but i
would never have guessed that the vendor would be apple.
some of the other differences between vanilla nvme and ans are
around command submission and completion. ans nvme command submission
is done via an array of command slots where the host picks a slot
and then posts every slot number it fills in to a doorbell. this
is different to vanilla nvme controllers which use a ring, and post
the producer index in that ring to a doorbell. ans also includes
some weird iommu, the handling of which we wrap up into the command
submission and completion functions.
this code is not yet enabled because it is incomplete. i'm getting
what i've done in so people with actual hardware can start poking
it more seriously.
this implementation is based on information figured out by the guys
porting linux to apple hardware.
dlg [Fri, 28 May 2021 03:05:01 +0000 (03:05 +0000)]
provide nvme_ops for vanilla pci nvme, and use them in the right places.
this paves the way for supporting the apple nvme storage controllers.
hopefully most of the remaining work on that is in the bus glue for
those controllers and this code won't need more tweaks.
hibernate still works, but it's relying on luck at the moment.
hibernate on arm64 and the apple controllers in particular will
almost certainly require more work here.
ok jmatthew@
dlg [Fri, 28 May 2021 02:34:38 +0000 (02:34 +0000)]
provide an nvme_ops struct to start trying to support apple m1 nvme.
the Apple NVME Storage (ans) controller is almost but not quite a
vanilla nvme controller. one difference is that it doesnt attach
to a pci bus, so it will need custom bus glue to attach on those
machines. the other differences are around command submission.
vanilla nvme command submission is done via rings where the host
fills in one or more entries on the ring and then posts where the
ring is up to in a doorbell. ans nvme command submission is done
via an array of command slots where the host picks a slot and then
posts every slot number it fills in to a doorbell instead. this is
kind of clever because once a command slot is allocated, you don't
need any coordination between multiple cpus using that array of
slots to fill in and post the entry they were allocated. on the
other hand, it's different, so the code needs to be specialised.
ans also seems to have some weird iommu thing that needs to be
maintained as commands are posted and completed.
the nvme_ops struct will allow vanilla and ans controllers to provide
their own backens for these different semantics.
ok jmatthew@
dlg [Fri, 28 May 2021 02:03:11 +0000 (02:03 +0000)]
move the nvme_dmamem prototypes so bus glue can use them.
ok jmatthew@
dlg [Fri, 28 May 2021 01:58:27 +0000 (01:58 +0000)]
shuffle the deck chairs. no functional change
dlg [Fri, 28 May 2021 01:57:20 +0000 (01:57 +0000)]
move nvme_barrier to nvmevar.h, just to keep it with the other reg ops.
dlg [Fri, 28 May 2021 01:54:43 +0000 (01:54 +0000)]
let nvme_read8 and nvme_write8 get used by bus glue too.
ok jmatthew@
dlg [Fri, 28 May 2021 01:51:11 +0000 (01:51 +0000)]
move the nvme_read4 and nvme_write4 macros to the header.
this allows nvme bus glue to use the macros too.
ok jmatthew@
cheloha [Thu, 27 May 2021 23:24:40 +0000 (23:24 +0000)]
vga(4): fix vga_doswitch() prototype
Timeout callback functions need to be void (*)(void *). No need to cast
the function pointer if fixing the type is trivial.
ok kettenis@
mvs [Thu, 27 May 2021 20:23:53 +0000 (20:23 +0000)]
Introduce the new test which enforces unp_internalize() to follow error
path and FRELE(9) descriptors.
ok @bluhm
bluhm [Thu, 27 May 2021 18:18:41 +0000 (18:18 +0000)]
Check that libexpat uses arc4random_buf as entropy source.
claudio [Thu, 27 May 2021 16:32:13 +0000 (16:32 +0000)]
Stop processing UPDATES if the peer is not up.
When the RDE issues an UPDATE NOTIFICATION because of some fatal error
like max-prefix count reached the peer is put into state PEER_ERR by
rde_update_err() and all UDPDATEs that are still queued should be dropped.
Noticed and OK deraadt@, OK job@
claudio [Thu, 27 May 2021 16:17:47 +0000 (16:17 +0000)]
With the update of tha as4byte code to RFC 6793 a 0 AS num in the AS4_PATH
results in a attribute delete and so the prefix is now visible. Adjust
expected file to match this.
claudio [Thu, 27 May 2021 16:10:29 +0000 (16:10 +0000)]
File missed in a previous commit. Should fix the error on the eval_all test.
claudio [Thu, 27 May 2021 14:32:08 +0000 (14:32 +0000)]
Rename and move functions used to get per-peer settings to the
hopefully better names peer_has_as4byte() and peer_accept_no_as_set().
Move them to rde_peer.c where all other peer functions live.
OK sthen@
krw [Thu, 27 May 2021 14:27:41 +0000 (14:27 +0000)]
Relax criteria for recognizing GPT formatted media by allowing the
EFI GPT partition (0xEE) in the protective MBR to be smaller that the
actual size of the media.
This allows GPT disk images dd'ed onto larger physical media to be
recognized by fdisk(8) and the kernel.
Feedback from kettenis@ on various earlier versions.
claudio [Thu, 27 May 2021 13:59:44 +0000 (13:59 +0000)]
remove excessive tabs and fix a tyop in comment.
bluhm [Thu, 27 May 2021 12:57:22 +0000 (12:57 +0000)]
No longer patch away other entropy sources from libexpat. Upstream
expat uses arc4random_buf(3) as first option if available. Drop
our local patch. Behavior stays the same. Updates will be easier.
Environment variable EXPAT_ENTROPY_DEBUG can be used to check that
arc4random_buf() is really used.
OK sthen@
job [Thu, 27 May 2021 09:41:02 +0000 (09:41 +0000)]
Fix more warnings
OK tb@
claudio [Thu, 27 May 2021 09:15:51 +0000 (09:15 +0000)]
Use negotiated capabilities to decide if a ROUTE-REFRESH message can be
sent (and also for which AFI/SAFI). Use a slightly better way to write
return if neither route-refresh nor enhanced route-refresh are on.
claudio [Thu, 27 May 2021 09:10:03 +0000 (09:10 +0000)]
Use correct RFC number in comment
job [Thu, 27 May 2021 09:01:08 +0000 (09:01 +0000)]
Fix warning
OK tb@
claudio [Thu, 27 May 2021 08:45:24 +0000 (08:45 +0000)]
When generating updates for a peer that has 'rde evaluate all' set the
old prefix pointer is most probably NULL. If a secondary route is removed
the withdraw would not happen because old == NULL which skips the withdraw.
Access to old is only needed to extract the prefix. So instead extract the
prefix early and use it for both cases. So if 'rde evaluate all' is used
the code tries all prefixes and if none is allowed a withdraw is issued.
Problem noticed and fix tested by Pier Carlo Chiodi
claudio [Thu, 27 May 2021 08:38:42 +0000 (08:38 +0000)]
Fix how the rde_eval_all flag is tracked. Make sure it is correctly set
when a new peer shows up or during a reload. Tracking this during runtime
just does not work reliably (especially for reloads).
Problem noticed and fix tested by Pier Carlo Chiodi
claudio [Thu, 27 May 2021 08:29:06 +0000 (08:29 +0000)]
Add the bits needed in bgpctl to show the new ADD-PATH and enhanced
route refresh capabilities in the neighbor output.
claudio [Thu, 27 May 2021 08:27:48 +0000 (08:27 +0000)]
bgpd(8) will soon support ADD-PATH (RFC7911) and enhanced route refresh
(RFC7313). This is the frist step toward this.
It adds the capability parsers for the two no capabilities, extends the
capability struct and adds the capability negotiation bits.
The route refresh message parser and generator are extended to support
the BoRR and EoRR message. Also add the new NOTIFICATION type and subtype
for the route refresh message.
claudio [Thu, 27 May 2021 08:20:39 +0000 (08:20 +0000)]
Fix bad logic in last commit. If graceful restart is on and the forwarding
state is preserved do the graceful restart dance. If graceful restart is off
or the forwarding state was not preserved flush the table.
kettenis [Thu, 27 May 2021 08:10:12 +0000 (08:10 +0000)]
Use todr_attach(). Prompted by cheloha@
claudio [Thu, 27 May 2021 07:52:54 +0000 (07:52 +0000)]
Improve graceful restart capability handling.
Announce only the graceful restart capability header but do not include any
AFI / SAFI pairs. bgpd does not preserve its forwarding state over restarts
and only implements the "Procedures for the Receiving Speaker".
When calculating the negotiated capabilities do not override the peer
capabilities (AFI / SAFI bits), just make sure the negotiated bits are
cleared. With this the peer capabilities are properly shown in bgpctl.
deraadt [Thu, 27 May 2021 05:51:50 +0000 (05:51 +0000)]
sync
dlg [Thu, 27 May 2021 03:46:15 +0000 (03:46 +0000)]
ajacoutot says i missed copying some bits from bridge for divert-to.
dlg [Thu, 27 May 2021 03:43:23 +0000 (03:43 +0000)]
ajacouto says i missed copying some bits from bridge for divert-to.
kettenis [Wed, 26 May 2021 20:52:21 +0000 (20:52 +0000)]
Add aplspmi(4), a driver for the Apple SPMI controller, and aplpmu(4)
a driver for the Apple "sera" SPMI power management unit that contains
the RTC on Apple M1 systems.
ok patrick@