tb [Fri, 26 Mar 2021 16:28:15 +0000 (16:28 +0000)]
Simplify argument parsing of vmctl stop
The previous argument parsing logic had at least three bugs:
a copy-paste error led to an off-by-one and a printf "%s" NULL,
as reported by Preben Guldberg. A previous commit led to a dead
else branch and a use of uninitialized. This can all be avoided
by reworking the logic so as to be readable.
Prompted by a diff from Preben
ok dv
claudio [Fri, 26 Mar 2021 16:03:29 +0000 (16:03 +0000)]
Compare filepath with strcmp() and not strcasecmp(). The URI in RPKI are
case sensitive.
OK tb@
lum [Fri, 26 Mar 2021 15:02:10 +0000 (15:02 +0000)]
Invert the 'R' indicator which seems rather unintuitive at the moment,
currently a '*' next to a file's name indicates it is writable. With
this diff it now means it is read-only. Also make the active buffer
indicator more visible:'.'->'>'.
inoguchi [Fri, 26 Mar 2021 13:46:25 +0000 (13:46 +0000)]
Sort header files and wrap long lines in x509.c
mpi [Fri, 26 Mar 2021 13:40:05 +0000 (13:40 +0000)]
Remove parenthesis around return value to reduce the diff with NetBSD.
No functional change.
ok mlarkin@
lum [Fri, 26 Mar 2021 12:31:37 +0000 (12:31 +0000)]
Add 'get-environment-variable', in a fashion:
(define curdir(get-environment-variable CURDIR))
(insert curdir)
Should now print the value of the environment variable CURDIR's value,
or error if it is not set.
stsp [Fri, 26 Mar 2021 10:18:55 +0000 (10:18 +0000)]
Fix wrong sequence number wrap in ieee80211_recv_auth().
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0xffff.
ok phessler@ kevlo@
claudio [Fri, 26 Mar 2021 10:01:51 +0000 (10:01 +0000)]
Rewrite poll loop a bit. Put the various message queues into an array
with the same order as the pollfds. This way simple for loops can be
used to setup and handle all cases but POLLIN.
OK tb@
lum [Fri, 26 Mar 2021 08:27:49 +0000 (08:27 +0000)]
Change the regex for define names. Make more characters available.
Keep the same regex for mg function names. Though perhaps for
user-defined functions other characters could be ok....
jan [Fri, 26 Mar 2021 08:17:23 +0000 (08:17 +0000)]
regen
jan [Fri, 26 Mar 2021 08:02:34 +0000 (08:02 +0000)]
Add PCI ID for Intel X710 10G SFP+ NIC
ok patrick@
jan [Fri, 26 Mar 2021 08:00:02 +0000 (08:00 +0000)]
regen
jan [Fri, 26 Mar 2021 07:58:44 +0000 (07:58 +0000)]
Add missing PCI ID for Intel X710 SFP+ NIC
ok patrick@
lum [Fri, 26 Mar 2021 07:25:23 +0000 (07:25 +0000)]
Change two more bool counters to pointer NULL checks.
dtucker [Fri, 26 Mar 2021 02:28:43 +0000 (02:28 +0000)]
Resync the supported hardware list with armv7.html, suggested by,
corrections and ok jsg@. This replaces the obsolete list of boards and
their supported devices with the current list of supported boards only,
similar to arm64.
abieber [Thu, 25 Mar 2021 21:27:45 +0000 (21:27 +0000)]
Permit kern.somaxconn when the unix pledge is used. Previously this was only
allowed when inet was used.
This lets Go programs use 'unix' without also including 'inet'.
from Josh Rickmar
ok / tree review from deraadt@, commit message cluestick from tb@
kn [Thu, 25 Mar 2021 20:46:55 +0000 (20:46 +0000)]
Log ioctl failures
Otherwise there is no way to determine why e.g. zzz(8) does not do anything
on certain machines; macppc and arm64 for example have no suspend/resume
suspend at all (for now) and loongson has partial support.
This still does not make `zzz' or `apm -z' report the informative
warning on standar error, but syslog now prints
apmd: system suspending
apmd: battery status: unknown. external power status: not known. estimated battery life 0%
apmd: suspend: Operation not supported
OK benno
lum [Thu, 25 Mar 2021 20:25:31 +0000 (20:25 +0000)]
Move the expression list create item code into a single function.
deraadt [Thu, 25 Mar 2021 19:10:39 +0000 (19:10 +0000)]
mail(1) cares about whitespace
lum [Thu, 25 Mar 2021 17:31:21 +0000 (17:31 +0000)]
Add an (exit) method.
lum [Thu, 25 Mar 2021 16:58:46 +0000 (16:58 +0000)]
User a pointer's value (!NULL) instead of a boolean to indicate some
kind of data being found.
mestre [Thu, 25 Mar 2021 16:23:39 +0000 (16:23 +0000)]
an invalid value of `mcs' may come from the hardware so adjust code so that the
value is only used after checking if it's valid or not.
CID
1502921
OK stsp@ phessler@
lum [Thu, 25 Mar 2021 12:46:11 +0000 (12:46 +0000)]
Use length of line to indicate end of characters to process in
foundparen(). No intended functional change. regress tests ok and they
all use excline().
claudio [Thu, 25 Mar 2021 12:18:45 +0000 (12:18 +0000)]
Adjust HTTP client code a bit. Add support for 304 Not Modified responses,
remove handling of 206 Partial Content (the client does not use range
headers). Report the Last-Modified timestamp back to the requestor and
switch OK to a enum value for (FAIL, OK and NOT MODIFIED).
OK tb@
kn [Thu, 25 Mar 2021 12:18:27 +0000 (12:18 +0000)]
Provide apm(4/arm64) with battery information
apm merely provides an all zero/unknown stub for those values, e.g. apm(8)
output is useless.
Hardware sensors however provide this information:
hw.sensors.cwfg0.volt0=3.76 VDC (battery voltage)
hw.sensors.cwfg0.raw0=259 (battery remaining minutes)
hw.sensors.cwfg0.percent0=58.00% (battery percent)
Make cwfg(4) copy those over using apm_setinfohook() for apm to show it:
Battery state: high, 58% remaining, 259 minutes life estimate
A/C adapter state: not known
Performance adjustment mode: auto (408 MHz)
In cwfg's update routine, to keep values coherent, always reset them to
zero/unknown and only set those that came from a valid reading.
Input OK jca
claudio [Thu, 25 Mar 2021 09:27:38 +0000 (09:27 +0000)]
Adjust base64_decode() to just take a base64 string as input instead of
a string plus length. Preparation work for RRDP.
OK tb@
tb [Thu, 25 Mar 2021 09:26:17 +0000 (09:26 +0000)]
Avoid mangled output in BIO_debug_callback
Instead of blindly skipping 14 characters, we can use the return
value of snprintf() to determine how much we should skip.
From Martin Vahlensieck with minor tweaks by me
jsg [Thu, 25 Mar 2021 04:12:00 +0000 (04:12 +0000)]
remove uneeded includes in md armv7 files
based on include-what-you-use suggestions
tobhe [Thu, 25 Mar 2021 01:39:09 +0000 (01:39 +0000)]
Sync correct ROUNDUP() from net/route.c
tb [Wed, 24 Mar 2021 21:36:26 +0000 (21:36 +0000)]
The server only sends a cookie during a HRR, not a SH
benno [Wed, 24 Mar 2021 21:03:06 +0000 (21:03 +0000)]
test HEAD requests, from niklas@
benno [Wed, 24 Mar 2021 20:59:53 +0000 (20:59 +0000)]
Responses to HEAD requests must not have a message body (even though they have
a Content-Length header). HTTP RFC 7231 section 4.3.2.
found by niklas@, claudio@ agrees.
jsing [Wed, 24 Mar 2021 19:02:35 +0000 (19:02 +0000)]
Update regress for new_cipher rename.
bru [Wed, 24 Mar 2021 18:50:54 +0000 (18:50 +0000)]
Add mouse.tp.tapping example.
ok kn@
sthen [Wed, 24 Mar 2021 18:49:40 +0000 (18:49 +0000)]
sync
sthen [Wed, 24 Mar 2021 18:49:25 +0000 (18:49 +0000)]
remove vendor name (Dell) repeated in product name
jsing [Wed, 24 Mar 2021 18:43:59 +0000 (18:43 +0000)]
Rename new_cipher to cipher.
This is in the SSL_HANDSHAKE struct and is what we're currently
negotiating, so there is really nothing more "new" about the cipher
than there is the key block or other parts of the handshake data.
ok inoguchi@ tb@
jsing [Wed, 24 Mar 2021 18:40:03 +0000 (18:40 +0000)]
Add SSL_HANDSHAKE_TLS12 for TLSv1.2 specific handshake data.
Move TLSv1.2 specific components over from SSL_HANDSHAKE.
ok inoguchi@ tb@
bru [Wed, 24 Mar 2021 18:28:24 +0000 (18:28 +0000)]
Improve the tap detection mechanism.
Revision 1.29 of wstpad.c has removed the 'maxdist' checks
for multi-finger taps. While this change makes tap detection
more reliable, and does not affect inputs intended for pointer
movement, it might interfere with short scroll gestures.
This version reorganizes the filtering code, and reintroduces
a weaker version of those checks for MT touchpads.
semarie [Wed, 24 Mar 2021 16:17:05 +0000 (16:17 +0000)]
cd9660, mfs: do not hide generic vop functions behind #define
It makes clearer which vop functions are real fileystem-implementations and which one are only stubs.
No functional changes are intented.
ok visa@
semarie [Wed, 24 Mar 2021 16:11:32 +0000 (16:11 +0000)]
make some `struct vops' members explicitly NULL instead of implicitly NULL
ok mpi@
krw [Wed, 24 Mar 2021 16:04:10 +0000 (16:04 +0000)]
More timespec conversions. Less 'seconds' arithmetic.
bluhm [Wed, 24 Mar 2021 14:26:39 +0000 (14:26 +0000)]
The logic in mmrw() to check whether an address is within direct
map was the wrong way around. The && prevented an EFAULT error and
could pass userland addresses as kernel source to copyout(9). The
kernel could crash with protection fault due to an invalid offset
when reading /dev/kmem.
Also make the range checks stricter. Not only the start address
must be valid, but also the end address must be within the region
to be copied.
Note that sysctl kern.allowkmem=0 makes the bug unreachable by
default.
OK deraadt@
inoguchi [Wed, 24 Mar 2021 12:09:16 +0000 (12:09 +0000)]
Convert openssl(1) x509 option handling
Apply new option handling to openssl(1) x509.
To handle incremental order value, using newly added OPTION_ORDER.
I left the descriptions for -CAform, -inform, and -outform as it was,
for now. These description would be fixed.
And digest option handler could be consolidated to one between
some subcommands in the future.
ok and comments from tb@,
and "I'd move forward with your current plan." from jsing@
inoguchi [Wed, 24 Mar 2021 12:07:39 +0000 (12:07 +0000)]
Add option type OPTION_ORDER
To handle incremental order value, added new option type OPTION_ORDER.
openssl(1) x509 requires this option handling, since,
- -CA and -signkey require to set both filename and incremental 'num'.
- -dates requires to set two variables in a row, startdate and enddate.
and this couldn't be solved by OPTION_FLAG_ORD.
ok tb@ and "I'd move forward with your current plan." from jsing@
bru [Wed, 24 Mar 2021 07:40:37 +0000 (07:40 +0000)]
Make tap detection less restrictive for multi-finger taps.
In order to distinguish tap gestures from short movements, the mechanism
checks whether the distance between the first and the last position of a
touch exceeds the 'maxdist' limit. Some touchpads provide unreliable
coordinates when more than one contact is being made simultaneously, and
in this case the filter may be too strong - and superfluous, because only
one-finger contacts should trigger pointer movement.
jcs [Wed, 24 Mar 2021 02:49:57 +0000 (02:49 +0000)]
Define a USB quirk for devices that need to keep their pipes open at
all times, before the device is enabled and after the device is
disabled by wscons.
This was originally needed by umt for the Microsoft Surface Type
Cover to avoid it resetting (or at least detaching and reattaching)
when the touchpad was touched while at the console.
A similar problem occurs with the Pinebook Pro's keyboard when
switching from X to the console due to the touchpad getting
disabled, so add it to ums as well.
with and ok kurt
jcs [Wed, 24 Mar 2021 02:21:40 +0000 (02:21 +0000)]
regen
jcs [Wed, 24 Mar 2021 02:20:44 +0000 (02:20 +0000)]
add HAILUCK Keyboard
from kurt
deraadt [Wed, 24 Mar 2021 00:27:34 +0000 (00:27 +0000)]
ensure the long-name version of ld is in the base set (rather than the
comp set), as it is supposed to be hard-linked.
found by Yoshihiro Kawamata
martijn [Tue, 23 Mar 2021 22:07:36 +0000 (22:07 +0000)]
Fix some ranges and type handling.
OK sthen@
martijn [Tue, 23 Mar 2021 22:05:21 +0000 (22:05 +0000)]
Add DisplayString/SnmpAdminString in accordance with recent OPENBSD-PF-MIB
changes.
OK sthen@
tobhe [Tue, 23 Mar 2021 21:31:29 +0000 (21:31 +0000)]
Don't send DELETE notify if IKE SA is replaced because of
'enforcesingleikesa'. Fixes an interop problem with strongswan
if make-before-break is enabled.
ok patrick@
tb [Tue, 23 Mar 2021 20:04:29 +0000 (20:04 +0000)]
OCSP_basic_verify() doesn't set errno, so use tls_set_errorx()
ok inoguchi
sthen [Tue, 23 Mar 2021 19:37:51 +0000 (19:37 +0000)]
change pfIfDescr and pfLogIfName from plain OCTET STRING (which has no
textual-convention so is sometimes printed as hex dump) to DisplayString
(ascii).
likewise change pfLabelName and pfTblName to SnmpAdminString (UTF-8
textual-convention).
feedback/tweaks (notably pointing out UTF-8)/ok martijn@
lum [Tue, 23 Mar 2021 18:40:29 +0000 (18:40 +0000)]
Use a pointer called bufp to point to a buffer called bufn
consistantly.
lum [Tue, 23 Mar 2021 18:33:05 +0000 (18:33 +0000)]
Correct how many arguments some functions take for interpreter.c.
florian [Tue, 23 Mar 2021 17:46:20 +0000 (17:46 +0000)]
Use time_t for intermediate lease time values when calculating human
readable output for very long timeouts to prevent overflow.
While here add years and days.
Days might actually show up in normal leases. Years is to catch
"infinity" which is encoded as UINT32_MAX and used by vmd(8).
Previously we would overflow, wrap to negative which then got
transformed to 0s.
Pointed out by Dave Voutila while working on the vmd(8) dhcp code.
claudio [Tue, 23 Mar 2021 16:34:31 +0000 (16:34 +0000)]
Timed out RSA key ops, may leave uncalled for responses in the imsg return
path. These have to be dropped or every subsequent call will cause decrypt
errors. Use a sequence number cookie to keep the systems in sync.
Diff from niklas@ with some minor adjustments by myself.
claudio [Tue, 23 Mar 2021 16:26:53 +0000 (16:26 +0000)]
Document SIOCGIFADDR and SIOCSIFADDR ioctls for tap devices.
OK kn@
lum [Tue, 23 Mar 2021 15:22:25 +0000 (15:22 +0000)]
Make a parameter to an mg function not throw an error just
because it is numerical.
abieber [Tue, 23 Mar 2021 13:22:16 +0000 (13:22 +0000)]
Document the @version suffix that can be added when running 'portgen go'
Patch from Josh Rickmar. Ty jrick!
stsp [Tue, 23 Mar 2021 12:03:44 +0000 (12:03 +0000)]
Fix a corner case bug in Rx block ack window gap-wait timeout handling.
If ieee80211_input_ba_flush() was called when there was nothing to flush,
the (already pending) gap wait timeout was re-armed.
This is only correct if we flush at least one packet. Otherwise packets
that arrive at a constant rate of about 4-5 packets per second would
extend the gap-wait timeout until the block ack window fills up.
In extreme cases this can result in packets being queued for almost 20s.
Fix this by returning immediately from ieee80211_input_ba_flush() if
the first packet in the reordering buffer is missing.
This prevents the timeout from being re-armed.
Patch by Christian Ehrhardt. Tested by me on iwm(4) 7265.
stsp [Tue, 23 Mar 2021 11:58:38 +0000 (11:58 +0000)]
When moving the Rx block ack window forward do not implicitly rely on
ieee80211_input_ba_flush() for updating ba->ba_winend.
Required for an upcoming ieee80211_input_ba_flush() fix.
Patch by Christian Ehrhardt who found one instance of this problem in
ieee80211_input_ba_seq(). I spotted another in ieee80211_ba_move_window().
mpi [Tue, 23 Mar 2021 10:30:40 +0000 (10:30 +0000)]
Make a child execute fork_return() only if PTRACE_FORK has been specified.
fork_return() does an additional check to send a SIGTRAP (for a debugger)
but this signal might overwrite the SIGSTOP generated by the parent doing
a PT_ATTACH before the child has a change to execute any instruction.
Prevent a race visible only on SP system with regress/sys/kern/ptrace2.
ok kettenis@
mpi [Tue, 23 Mar 2021 10:22:20 +0000 (10:22 +0000)]
Skip first frame when saving stacktraces, it's always witness_checkorder().
ok visa@
patrick [Tue, 23 Mar 2021 09:41:12 +0000 (09:41 +0000)]
Pack the SPCR struct definition since the struct isn't naturally aligned
or padded, and hence e. g. the access to the PCI vendor/device id would be
broken. The structs for the other tables all seem to be packed as well.
ok kettenis@
patrick [Mon, 22 Mar 2021 20:34:45 +0000 (20:34 +0000)]
Now that MSI pages are properly mapped, all that debug code in smmu(4)
can be removed. The only thing left to implement for smmu(4) to work
out of the box with PCIe devices is to reserve the PCIe MMIO windows.
Let's see how we can do this properly.
tb [Mon, 22 Mar 2021 20:31:34 +0000 (20:31 +0000)]
Don't leak ca in test_cms_sign_verify().
Reported by Ilya Shipitsin
patrick [Mon, 22 Mar 2021 20:30:21 +0000 (20:30 +0000)]
Load MSI pages through bus_dma(9). Our interrupt controllers for MSIs
typically pass the physical address, however retrieved, to our PCIe
controller code. This physical address can in practise be directly
given to the PCIe, but it is not a given that the CPU and the PCIe
controller are able to use the same physical addresses.
This is even more obvious with an smmu(4) inbetween, which can change
the world view by introducing I/O virtual addresses. Hence for this
it is indeed necessary to map those pages, which thanks to integration
with bus_dma(9) works easily.
For this we remember the PCI devices' DMA tag in the interrupt handle
during the MSI map, so that we can use the smmu(4)-hooked DMA tag to
load the physical address.
While some systems might prefer to implement "trapping" pages for MSIs,
to make sure devices cannot trigger other devices' interrupts, we only
make sure the whole page is mapped.
Having the IOMMU create a mapping for each MSI is a bit wasteful, but
for now it's the simplest way to implement it.
Discussed with and ok kettenis@
tb [Mon, 22 Mar 2021 20:05:21 +0000 (20:05 +0000)]
Plug a few memory leaks reported by Ilya Shipitsin
kn [Mon, 22 Mar 2021 18:50:11 +0000 (18:50 +0000)]
Properly reflect stopping state
Diff from Preben Guldberg < preben at guldberg dot org>, thanks!
In "vmctl status", VMs that are being stopped but are still running
will simply show up as "running".
Give preference to showing the "stopping" state akin to how a paused
VM is handled.
Tested by Dave Voutila
OK tb
kn [Mon, 22 Mar 2021 18:37:26 +0000 (18:37 +0000)]
Update device-tree bindings
Using the DTB from our dtb package this driver no longer attaches
(on a Pinebook Pro)due to renamed bindings:
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
Thanks to kettenis and patrick for pointing this out.
Follow upstream's rename and acccount for the monitor interval now being
milliseconds not seconds anymore.
This makes cwfg(4) export values under hw.sensors as expected when using
/usr/local/share/dtb/arm64/rockchip/rk3399-pinebook-pro.dtb .
Input patrick kettenis
OK kettenis
florian [Mon, 22 Mar 2021 16:28:25 +0000 (16:28 +0000)]
BOOTP has a minimum packet length of 300 bytes. Since DHCP is
interoperable with BOOTP we should also send packets that have a
minimum size of 300.
I haven't seen a DHCP server that actually enforces this except the
one in vmd(8), but it doesn't cost us much and prevents hair pulling
later on when we find one in the wild.
OK deraadt
otto [Mon, 22 Mar 2021 15:34:07 +0000 (15:34 +0000)]
Avoid overflow by writing x = (y * 7) / 8 as x = y - (y / 8); ok florian
claudio [Mon, 22 Mar 2021 11:49:15 +0000 (11:49 +0000)]
Remove unveil() from the rsync_sender() and flist_gen(). The sender is
not able to properly unveil itself because you can request many files
as arguments. At the same time the sender is read-only and uses rpath
pledge() so the gain from unveil() is less of an issue.
On the receiver side all files land in one directory and this part still
uses unveil() to protect rsync to somehow walk out of the destination
directory.
From kristaps@
claudio [Mon, 22 Mar 2021 11:26:44 +0000 (11:26 +0000)]
Adjust function name in error strings.
From kristaps@
claudio [Mon, 22 Mar 2021 11:25:29 +0000 (11:25 +0000)]
Adjust a type to unsigned since the io function works on unsigned ints.
Also the id is a strictly positve integer so this make sense.
Cleanup comments and a spacing while there.
From kristaps@
claudio [Mon, 22 Mar 2021 11:20:04 +0000 (11:20 +0000)]
Put comment where it belongs also remove an assert() that checks for an
impossible condition. The map argument is from a pread() call and can never
be MAP_FAILED.
From kristaps@
claudio [Mon, 22 Mar 2021 11:16:05 +0000 (11:16 +0000)]
Compare explicitly against NULL.
From kristaps@
claudio [Mon, 22 Mar 2021 11:14:42 +0000 (11:14 +0000)]
Make fmt argument const. Format local vars a bit.
From kristaps@
stsp [Mon, 22 Mar 2021 09:52:49 +0000 (09:52 +0000)]
Let iwn(4) simply clear frames before the firmware's BA window, instead
of trying to be smart and clearing already acknowledged frames which are
still within the firmware's BA window.
This matches what the Linux driver does and makes our driver code simpler.
Also, Tx rate control code relies on sequence numbers falling into the
BA window so let's skip Tx rate control for frames before this window.
Tested by:
myself on 6205 and 6300
afresh1, bluhm, and paco on 6300
jmatthew on 5100
Balder Oddson on 6205
lum [Mon, 22 Mar 2021 09:26:23 +0000 (09:26 +0000)]
Start the move to TAILQ for expressions instead of an SLIST.
espie [Mon, 22 Mar 2021 07:34:34 +0000 (07:34 +0000)]
document NEVER_CLEAN
tobhe [Sun, 21 Mar 2021 22:18:00 +0000 (22:18 +0000)]
The tag comes after iface in iked.conf(5).
tb [Sun, 21 Mar 2021 19:08:22 +0000 (19:08 +0000)]
Fully initialize rrec in tls12_record_layer_open_record_protected
The CBC code path initializes rrec.padding_length in an indirect fashion
and later makes use of it for copying the MAC. This is confusing some
static analyzers as well as people investigating the whining. Avoid this
confusion and add a bit of robustness by clearing the stack variable up
front.
ok jsing
jsing [Sun, 21 Mar 2021 18:37:26 +0000 (18:37 +0000)]
Revise regress to match handshake struct changes.
jsing [Sun, 21 Mar 2021 18:36:34 +0000 (18:36 +0000)]
Move the TLSv1.3 handshake struct inside the shared handshake struct.
There are currently three different handshake structs that are in use -
the SSL_HANDSHAKE struct (as S3I(s)->hs), the SSL_HANDSHAKE_TLS13 struct
(as S3I(s)->hs_tls13 or ctx->hs in the TLSv1.3 code) and the infamous
'tmp' embedded in SSL3_STATE_INTERNAL (as S3I(s)->tmp)).
This is the first step towards cleaning up the handshake structs so that
shared data is in the SSL_HANDSHAKE struct, with sub-structs for TLSv1.2
and TLSv1.3 specific information. Place SSL_HANDSHAKE_TLS13 inside
SSL_HANDSHAKE and change ctx->hs to refer to the SSL_HANDSHAKE struct
instead of the SSL_HANDSHAKE_TLS13 struct. This allows the TLSv1.3 code
to access the shared handshake data without needing the SSL struct.
ok inoguchi@ tb@
florian [Sun, 21 Mar 2021 18:25:24 +0000 (18:25 +0000)]
Use new terminology of RFC 8981 and (mechanically) replace "privacy"
with "temporary".
sthen [Sun, 21 Mar 2021 18:13:59 +0000 (18:13 +0000)]
wg(4): fix race between tx/rx handshakes, from Matt Dunwoodie, ok mpi@
"There is a race between sending/receiving handshake packets. This
occurs if we consume an initiation, then send an initiation prior to
replying to the consumed initiation.
In particular, when consuming an initiation, we don't generate the
index until creating the response (which is incorrect). If we attempt
to create an initiation between these processes, we drop any
outstanding handshake which in this case has index 0 as set when
consuming the initiation.
The fix attached is to generate the index when consuming the initiation
so that any spurious initiation creation can drop a valid index. The
patch also consolidates setting fields on the handshake."
jsing [Sun, 21 Mar 2021 17:25:17 +0000 (17:25 +0000)]
Split TLSv1.3 record protection from record layer.
This makes the TLSv1.2 and TLSv1.3 record layers more consistent and while
it is not currently necessary from a functionality perspective, it makes
for more readable and simpler code.
ok inoguchi@ tb@
jsing [Sun, 21 Mar 2021 17:22:37 +0000 (17:22 +0000)]
Build options regress with -DLIBRESSL_INTERNAL.
This is currently needed for DTLS1_2_VERSION, however it should be used
here regardless.
jsing [Sun, 21 Mar 2021 16:56:42 +0000 (16:56 +0000)]
Avoid a use-after-scope in tls13_cert_add().
A parent CBB retains a reference to a child CBB until CBB_flush() or
CBB_cleanup() is called. As such, the cert_exts CBB must be at function
scope.
Reported by Ilya Shipitsin.
ok tb@
bru [Sun, 21 Mar 2021 16:20:49 +0000 (16:20 +0000)]
Include wstpad allocations when cleaning up wsmouse resources.
ok gnezdo@
visa [Sun, 21 Mar 2021 14:18:37 +0000 (14:18 +0000)]
Disambiguate expressions.
tb [Sun, 21 Mar 2021 14:06:29 +0000 (14:06 +0000)]
Plug memory leak reported by Ilya Shipitsin
Since r1.7, input in base64_decoding_test() is allocated unconditionally,
so free it unconditionally.
florian [Sun, 21 Mar 2021 13:59:22 +0000 (13:59 +0000)]
Don't warn that we can't form a temporary address when a router
deprecates a prefix by sending a pltime of 0, this is normal.
Continue warning when the pltime is smaller than 5 as this is almost
certainly a configuration error.
Found the hard way by & OK otto.
lum [Sun, 21 Mar 2021 12:56:16 +0000 (12:56 +0000)]
Add quoted strings capability in list values, no special chars
detection in between them though. Add limitation to characters
allowed in symbol names, equivalent to mg function names (A-Za-z-),
quite restrictive but can grow of course. If value is not quoted and
is not a variable, give an error.
semarie [Sun, 21 Mar 2021 11:29:38 +0000 (11:29 +0000)]
makes `struct execsw' to:
- use C99-style initialization (grep works better with that)
- use const as execsw is not modified during runtime
ok mpi@
mpi [Sun, 21 Mar 2021 10:24:36 +0000 (10:24 +0000)]
Use uppercases for defines.
No functional change.
ok semarie@