openbsd
3 years agoadd a SK_DUMMY_INTEGRATE define that allows the dummy security key
djm [Sat, 30 Jan 2021 00:56:38 +0000 (00:56 +0000)]
add a SK_DUMMY_INTEGRATE define that allows the dummy security key
middleware to be directly linked; useful for writing fuzzers, etc.

3 years agoAdd proper padding for pfkey messages. Use ROUNDUP() for auth and
tobhe [Fri, 29 Jan 2021 21:26:06 +0000 (21:26 +0000)]
Add proper padding for pfkey messages. Use ROUNDUP() for auth and
enc keys.

ok patrick@

3 years agoSome libunbound configuration changes can change the quality of a
florian [Fri, 29 Jan 2021 17:48:58 +0000 (17:48 +0000)]
Some libunbound configuration changes can change the quality of a
resolver so we have to schedule a re-check.
OK kn

3 years agoDon't filter by address family on the route socket.
florian [Fri, 29 Jan 2021 17:46:04 +0000 (17:46 +0000)]
Don't filter by address family on the route socket.
While here also set SOCK_NONBLOCK on the frontend routesock.

3 years agoupdate remaining usb.org URLs
sthen [Fri, 29 Jan 2021 17:12:19 +0000 (17:12 +0000)]
update remaining usb.org URLs

3 years agoupdate usb.org URLs
sthen [Fri, 29 Jan 2021 17:06:19 +0000 (17:06 +0000)]
update usb.org URLs

3 years agoupdate some usb.org URLs following reorganisation, add a new one for upd
sthen [Fri, 29 Jan 2021 16:59:41 +0000 (16:59 +0000)]
update some usb.org URLs following reorganisation, add a new one for upd
partly from Alessandro Ricci

3 years agoAdjust for disabling gcc on macppc.
kettenis [Fri, 29 Jan 2021 16:40:07 +0000 (16:40 +0000)]
Adjust for disabling gcc on macppc.

3 years agoStop building gcc on macppc.
kettenis [Fri, 29 Jan 2021 16:38:20 +0000 (16:38 +0000)]
Stop building gcc on macppc.

ok cwen@, deraadt@

3 years agorepair declerations to satisfy -fno-common
deraadt [Fri, 29 Jan 2021 16:22:34 +0000 (16:22 +0000)]
repair declerations to satisfy -fno-common
ok kettenis

3 years agobe more forceful about FULLPKGPATH
espie [Fri, 29 Jan 2021 15:58:56 +0000 (15:58 +0000)]
be more forceful about FULLPKGPATH

3 years agoDon't rely on USB interfaces being at compliant indices.
edd [Fri, 29 Jan 2021 11:44:06 +0000 (11:44 +0000)]
Don't rely on USB interfaces being at compliant indices.

When obtaining an interface handle, we currently rely on the device being
properly USB compliant, and thus the interface being at the correct index in
the interfaces array.

However, some devices present their indices incorrectly. For example, the
following audio device exposes interfaces 0, 1 and 3, in that order (skipping
interface 2 entirely):

uaudio2 at uhub4 port 4 configuration 1 interface 3 "E+ Corp. DAC Audio" rev 1.10/0.01 addr 2
uaudio2: class v1, full-speed, async, channels: 2 play, 0 rec, 3 ctls

This means that that the audio stream interface (number 3) is not found at the
expected index of 2, and this causes looking up the handle to fail.

This change makes usbd_device2interface_handle() search for the right
interface, instead of assuming it will be at the right index. Although this is
a little slower, note that this routine not very frequently called and there
are typically not hundreds of interfaces on a typical USB device.

This fixes the above E+ Corp device, and one other uaudio device reported
broken by a user.

With input from, tested by, and OK ratchov@, mglocker@ and kettenis@.

Many thanks!

3 years agoMake audio clients use struct opt to reach the device
ratchov [Fri, 29 Jan 2021 11:38:23 +0000 (11:38 +0000)]
Make audio clients use struct opt to reach the device

No behavior change. This decreases the number of explicit references
to the dev structure

3 years agoMake control clients use struct opt to reach the device
ratchov [Fri, 29 Jan 2021 11:36:44 +0000 (11:36 +0000)]
Make control clients use struct opt to reach the device

No behavior change. This decreases the number of explicit references
to the dev structure.

3 years agoRename ctlslot->mask to ctlslot->self to match the rest of the code
ratchov [Fri, 29 Jan 2021 11:31:28 +0000 (11:31 +0000)]
Rename ctlslot->mask to ctlslot->self to match the rest of the code

No binary change.

3 years agoOrder opt_list in opt_new() call order, limit items to OPT_NMAX
ratchov [Fri, 29 Jan 2021 11:25:05 +0000 (11:25 +0000)]
Order opt_list in opt_new() call order, limit items to OPT_NMAX

No behavior change, except for improved debug printfs.

3 years agoMove the options list out of the device structure
ratchov [Fri, 29 Jan 2021 11:21:00 +0000 (11:21 +0000)]
Move the options list out of the device structure

No behavior change. Later this will ease applying the configuration of
one device to another by "just" swapping pointers.

3 years agoMove the control client state out of the device structure
ratchov [Fri, 29 Jan 2021 10:55:19 +0000 (10:55 +0000)]
Move the control client state out of the device structure

No behavior change. Later this will ease changing the controlled
device by "just" swapping pointers.

3 years agoMove the audio clients state out of the device structure
ratchov [Fri, 29 Jan 2021 10:51:24 +0000 (10:51 +0000)]
Move the audio clients state out of the device structure

No behavior change. Later this will ease moving clients from one
device to another by "just" swapping pointers.

3 years agoUse NULL instead of 0 to clear v_socket pointer (which actually clears all
claudio [Fri, 29 Jan 2021 10:47:24 +0000 (10:47 +0000)]
Use NULL instead of 0 to clear v_socket pointer (which actually clears all
of the v_un pointers).
OK jsg@ mvs@

3 years agoAdjust regress test, the hash argument to the parse functions was removed.
claudio [Fri, 29 Jan 2021 10:15:42 +0000 (10:15 +0000)]
Adjust regress test, the hash argument to the parse functions was removed.

3 years agoA while ago rpki-client was changed to validate the sha256 hashes of
claudio [Fri, 29 Jan 2021 10:13:16 +0000 (10:13 +0000)]
A while ago rpki-client was changed to validate the sha256 hashes of
files referenced in MFT files during the validation of the MFT file.
An MFT is only valid if all files are present and their hashes are valid.
Because of this there is no longer the need to check the hash when
these files are parsed later on. Remove these checks for CRT, ROA and CRL
files. Use the presence of the pkey when parsing cert files to decide
if it is a root cert or not.
OK tb@

3 years agoTrim output overwritten by later text or clears completely rather than
nicm [Fri, 29 Jan 2021 09:48:43 +0000 (09:48 +0000)]
Trim output overwritten by later text or clears completely rather than
only in a few cases. This means we can better track when a line should
wrap. GitHub issue 2537.

3 years agorecognise Cortex-A78C
jsg [Fri, 29 Jan 2021 08:48:19 +0000 (08:48 +0000)]
recognise Cortex-A78C

3 years agofix the values of enum sock_type
djm [Fri, 29 Jan 2021 06:29:46 +0000 (06:29 +0000)]
fix the values of enum sock_type

3 years agogive typedef'd struct a struct name; makes the fuzzer I'm writing a bit
djm [Fri, 29 Jan 2021 06:28:10 +0000 (06:28 +0000)]
give typedef'd struct a struct name; makes the fuzzer I'm writing a bit
easier

3 years agoWhitespace.
rob [Fri, 29 Jan 2021 00:31:41 +0000 (00:31 +0000)]
Whitespace.

3 years agoRemove print_{debug,verbose} since they're currently unused and I see no
martijn [Thu, 28 Jan 2021 20:45:14 +0000 (20:45 +0000)]
Remove print_{debug,verbose} since they're currently unused and I see no
reason to start using them in the future.

OK tb@

3 years agobridge(4): convert ifunit() to if_unit(9)
mvs [Thu, 28 Jan 2021 20:06:38 +0000 (20:06 +0000)]
bridge(4): convert ifunit() to if_unit(9)

ok bluhm@ sashan@

3 years agotrunk(4): convert ifunit to if_unit(9)
mvs [Thu, 28 Jan 2021 20:04:44 +0000 (20:04 +0000)]
trunk(4): convert ifunit to if_unit(9)

ok bluhm@

3 years agoAdd '$' to ober_scanf_elements().
martijn [Thu, 28 Jan 2021 19:56:33 +0000 (19:56 +0000)]
Add '$' to ober_scanf_elements().
This allows us to enforce end of sequence/set without having to manually
check be_next for NULL.

No lib bump needed according to millert@
OK millert@ rob@

3 years agobios_memmap[] should not be a common
deraadt [Thu, 28 Jan 2021 18:54:50 +0000 (18:54 +0000)]
bios_memmap[] should not be a common
ok kettenis

3 years agoRemove direct assignment of aead_ctx.
jsing [Thu, 28 Jan 2021 18:32:46 +0000 (18:32 +0000)]
Remove direct assignment of aead_ctx.

Now that AEAD is handled internally, we should no longer be assigning
aead_ctx directly, as this will result in a leak. Missed during the
previous change.

3 years agoAdd ldap(1) to the SEE ALSO section. OK deraadt@
millert [Thu, 28 Jan 2021 18:09:15 +0000 (18:09 +0000)]
Add ldap(1) to the SEE ALSO section.  OK deraadt@

3 years agoAgain allow COPTS= to come from the environment again, and don't lose the
deraadt [Thu, 28 Jan 2021 17:39:01 +0000 (17:39 +0000)]
Again allow COPTS= to come from the environment again, and don't lose the
SMALL_KERNEL specific variations.
ok espie jsg

3 years agotpm(4): fix delay units
cheloha [Thu, 28 Jan 2021 17:19:40 +0000 (17:19 +0000)]
tpm(4): fix delay units

tpm(4) has timeout constants in milliseconds, e.g.

#define TPM_ACCESS_TMO 2000 /* 2sec */

This is fine.

The odd thing is that tpm(4) first converts these timeouts to counts
of ticks via tpm_tmotohz() before using DELAY() to busy-wait.  DELAY()
takes a count of microseconds, which are not equivalent to ticks, so
the units are all screwed up.

Let's correct this:

- Remove tpm_tmotohz().  We're not working with ticks so we don't it.

- Multiply the timeouts to match the delay interval.  tpm_request_locality()
  and tpm_getburst() use intervals of 10 microseconds, so multiply the
  millisecond timeouts by 100.  In tpm_waitfor() the delay interval is 1
  microsecond, so multiply the millisecond timeout by 1000.

- Update the parameter name in tpm_waitfor() to note that we expect a
  count of milliseconds, not "tries".

Discussion: https://marc.info/?l=openbsd-tech&m=160995671326406&w=2

Prompted by kettenis@.

Suspend/resume tested by florian@ on an X1 Gen 2.  For the record, it
looks like this:

tpm0 at acpi0 TPM_ addr 0xfed40000/0x5000, device 0x0000104a rev 0x4e

Earlier versions of this patch were reviewed by kn@, but the patch
became more ambitious when kettenis@ got involved so those reviews
are no longer applicable.

jcs@ notes (https://marc.info/?l=openbsd-tech&m=160834427630142&w=2)
in a related discussion that this driver "sucks" and should be
replaced with NetBSD's rewrite.  This would get us a cleaner driver
with TPM 2.0 support.  So there is future work to do here.

ok kettenis@

3 years agoMove AEAD handling into the new TLSv1.2 record layer.
jsing [Thu, 28 Jan 2021 17:00:38 +0000 (17:00 +0000)]
Move AEAD handling into the new TLSv1.2 record layer.

ok tb@

3 years agoShow when witness(4) has run out of lock order data entries.
visa [Thu, 28 Jan 2021 15:13:27 +0000 (15:13 +0000)]
Show when witness(4) has run out of lock order data entries.

This makes it clearer why lock order traces are sometimes not displayed.

Prompted by a question from, and OK anton@

3 years agoDrop tcp_trace() from SMALL_KERNEL builds to make room on amd64 floppy
visa [Thu, 28 Jan 2021 14:53:20 +0000 (14:53 +0000)]
Drop tcp_trace() from SMALL_KERNEL builds to make room on amd64 floppy

OK deraadt@

3 years agoBe consistent in not using parameter names for function prototypes;
mglocker [Thu, 28 Jan 2021 12:50:28 +0000 (12:50 +0000)]
Be consistent in not using parameter names for function prototypes;
I've missed two more cases in the previous commit.

3 years agoWhen an audio device is disconnected, drop MIDI clients controlling it
ratchov [Thu, 28 Jan 2021 11:17:58 +0000 (11:17 +0000)]
When an audio device is disconnected, drop MIDI clients controlling it

3 years agoDont attempt to drain disconnected clients
ratchov [Thu, 28 Jan 2021 11:15:31 +0000 (11:15 +0000)]
Dont attempt to drain disconnected clients

Clients are always drained before they disconnect, so this change
affects programs that die unexpectedly or loose thier network
connection.

Besides the bad style, this change fixes a theoretical bug when the
disconnected client slot could be recycled and given to another client
while it's being drained

3 years agoIn slot_xxx(), store dev pointer in local variable
ratchov [Thu, 28 Jan 2021 11:10:00 +0000 (11:10 +0000)]
In slot_xxx(), store dev pointer in local variable

This removes many redundant dereferences to obtain the dev pointer
from the slot stucture and makes the source slightly more readable.
No behavior change.

3 years agoUse everywhere the same pattern to handle fractional clock ticks
ratchov [Thu, 28 Jan 2021 11:06:58 +0000 (11:06 +0000)]
Use everywhere the same pattern to handle fractional clock ticks

No behavior change; this change is only to make the maths easier to
proofread

3 years agoMake slot_{attach,detach}() the opposite of each other
ratchov [Thu, 28 Jan 2021 11:06:07 +0000 (11:06 +0000)]
Make slot_{attach,detach}() the opposite of each other

No bahavior change. Now, slot_attach() moves slot's clock forward and
puts the slot on device list; slot_detach() does the opposite: remove
from device list and move clock backwards. This will allow to detach a
client and attach it later in exactly the same state.

3 years agoDrop unused dev_nctl() function and few unused prototypes
ratchov [Thu, 28 Jan 2021 11:02:28 +0000 (11:02 +0000)]
Drop unused dev_nctl() function and few unused prototypes

3 years agohandle "once" rules before letting pfsync defer tx of a packet.
dlg [Thu, 28 Jan 2021 09:37:20 +0000 (09:37 +0000)]
handle "once" rules before letting pfsync defer tx of a packet.

pfsync may want to defer the transmission of a packet. it does this so
it can try and get a state over to a peer firewall before a host may
send a reply to the peer, which would get dropped cos there's no
matching state.

i think the once rule processing should happen before that. the state
is created from the rule, whether the packet the state is for goes out
immediately or not shouldn't matter.

ok sashan@

3 years agoA new resolver can be created while we currently run a check with the
florian [Thu, 28 Jan 2021 07:34:34 +0000 (07:34 +0000)]
A new resolver can be created while we currently run a check with the
old configuration. We will then request another check that runs in
parallel to the old check. If the new check finishes earlier, the
current check result will be overwritten by an outdated check result
which is likely wrong.
While here fix some whitespace.
OK phessler

3 years agoRename bNumInterface to bNumInterfaces to fix build on arm64.
kurt [Thu, 28 Jan 2021 01:48:54 +0000 (01:48 +0000)]
Rename bNumInterface to bNumInterfaces to fix build on arm64.

3 years agoExtern dwarf2_loc_mark_labels. Fixes compiation with -fno-common.
mortimer [Thu, 28 Jan 2021 01:39:19 +0000 (01:39 +0000)]
Extern dwarf2_loc_mark_labels. Fixes compiation with -fno-common.

ok deraadt@

3 years agoExplicitly enable -fcommon, rather than untangle common symbols.
mortimer [Thu, 28 Jan 2021 01:36:32 +0000 (01:36 +0000)]
Explicitly enable -fcommon, rather than untangle common symbols.

ok deraadt@

3 years agoExtern privsep_process. Fixes compilation with -fno-common.
mortimer [Thu, 28 Jan 2021 01:20:37 +0000 (01:20 +0000)]
Extern privsep_process. Fixes compilation with -fno-common.

ok deraadt@

3 years agoExtern transport_list. Fixed compilation with -fno-common.
mortimer [Thu, 28 Jan 2021 01:18:44 +0000 (01:18 +0000)]
Extern transport_list. Fixed compilation with -fno-common.

ok deraadt@

3 years agoif the route resolved in pf_route is invalid, generate an icmp error.
dlg [Wed, 27 Jan 2021 23:53:35 +0000 (23:53 +0000)]
if the route resolved in pf_route is invalid, generate an icmp error.

of course this is limited to the !dup-to case.

ok sashan@ bluhm@

3 years agofix leak: was double allocating kex->session_id buffer
djm [Wed, 27 Jan 2021 23:49:46 +0000 (23:49 +0000)]
fix leak: was double allocating kex->session_id buffer

3 years agoupdate comment, SMALL was split into SMALL and NOSSL
sthen [Wed, 27 Jan 2021 22:27:41 +0000 (22:27 +0000)]
update comment, SMALL was split into SMALL and NOSSL

3 years agoUnveil ldapd. Follow recent precedent and elect to forego the unlinking of
rob [Wed, 27 Jan 2021 22:12:28 +0000 (22:12 +0000)]
Unveil ldapd. Follow recent precedent and elect to forego the unlinking of
some objects at shutdown thereby allowing for a tighter unveil.

Feedbackup from deraadt@ and martijn@.

OK deraadt@

3 years agoremove bogus key hack now that it's handled by libtls
eric [Wed, 27 Jan 2021 20:33:05 +0000 (20:33 +0000)]
remove bogus key hack now that it's handled by libtls

no objection claudio@
ok tb@ jsing@

3 years agowrap an overlong line
tb [Wed, 27 Jan 2021 20:16:58 +0000 (20:16 +0000)]
wrap an overlong line

3 years agosync
tb [Wed, 27 Jan 2021 18:01:55 +0000 (18:01 +0000)]
sync

3 years agoLink SSL_get_finished.3 to build.
tb [Wed, 27 Jan 2021 18:00:25 +0000 (18:00 +0000)]
Link SSL_get_finished.3 to build.

3 years agoWrite SSL_get_finished() documentation from scratch.
tb [Wed, 27 Jan 2021 17:59:57 +0000 (17:59 +0000)]
Write SSL_get_finished() documentation from scratch.

ok beck

3 years agoMerge SSL_set_hostflags documentation from OpenSSL 1.1.1i and
tb [Wed, 27 Jan 2021 17:57:40 +0000 (17:57 +0000)]
Merge SSL_set_hostflags documentation from OpenSSL 1.1.1i and
add HISTORY section.  This is currently ignored input next to
SSL_get0_peername() and will be unignored once the symbols are
made publicly visible in libssl.

3 years agoThe usb configuration descriptor parameter providing the number of
mglocker [Wed, 27 Jan 2021 17:28:19 +0000 (17:28 +0000)]
The usb configuration descriptor parameter providing the number of
available device interfaces is called 'bNumInterfaces'.

ok phessler@, thfr@ (who provided the man page diff)

3 years agoPromote nrules/maxrules to size_t and make sure they can't overflow.
millert [Wed, 27 Jan 2021 17:02:50 +0000 (17:02 +0000)]
Promote nrules/maxrules to size_t and make sure they can't overflow.
reallocarray(3) will fail if nmemb * size would overflow.
OK tb@ martijn@

3 years agomark up fixes; from lyndon
jmc [Wed, 27 Jan 2021 14:59:10 +0000 (14:59 +0000)]
mark up fixes; from lyndon

3 years agoword fix;
jmc [Wed, 27 Jan 2021 14:58:06 +0000 (14:58 +0000)]
word fix;

3 years agospelling fixes;
jmc [Wed, 27 Jan 2021 14:57:29 +0000 (14:57 +0000)]
spelling fixes;

3 years agoregen
jsg [Wed, 27 Jan 2021 10:48:44 +0000 (10:48 +0000)]
regen

3 years agoadd some more amdgpu devices
jsg [Wed, 27 Jan 2021 10:47:58 +0000 (10:47 +0000)]
add some more amdgpu devices

3 years agoFlush pending output before entering or exiting alternate screen rather
nicm [Wed, 27 Jan 2021 10:42:52 +0000 (10:42 +0000)]
Flush pending output before entering or exiting alternate screen rather
than leaking it, oss-fuzz issue 29959.

3 years agothis needs kex.h now
djm [Wed, 27 Jan 2021 10:15:08 +0000 (10:15 +0000)]
this needs kex.h now

3 years agomake ssh->kex->session_id a sshbuf instead of u_char*/size_t and
djm [Wed, 27 Jan 2021 10:05:28 +0000 (10:05 +0000)]
make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@

3 years agoremove global variable used to stash compat flags and use the
djm [Wed, 27 Jan 2021 09:26:53 +0000 (09:26 +0000)]
remove global variable used to stash compat flags and use the
purpose-built ssh->compat variable instead; feedback/ok markus@

3 years agoBe consistent in not using parameter names for function prototypes.
mglocker [Wed, 27 Jan 2021 08:32:46 +0000 (08:32 +0000)]
Be consistent in not using parameter names for function prototypes.

3 years agoDetermine available address families (and monitor when this changes)
florian [Wed, 27 Jan 2021 08:30:50 +0000 (08:30 +0000)]
Determine available address families (and monitor when this changes)
to configure libunbound accordingly. This way it no longer tries to
talk to IPv6 nameservers when only IPv4 is available and vice versa.
input deraadt
OK kn

3 years agodo better accounting of how many msix interrupts we want to use.
dlg [Wed, 27 Jan 2021 07:46:11 +0000 (07:46 +0000)]
do better accounting of how many msix interrupts we want to use.

ok jmatthew@

3 years agothese programs (with common ancestry) had a -fno-common problem related
deraadt [Wed, 27 Jan 2021 07:21:52 +0000 (07:21 +0000)]
these programs (with common ancestry) had a -fno-common problem related
to privsep_procid.
ok mortimer

3 years agosplit out extern and decl for -fno-common
deraadt [Wed, 27 Jan 2021 07:21:12 +0000 (07:21 +0000)]
split out extern and decl for -fno-common

3 years agomakemap does not need a common which it does not use.
deraadt [Wed, 27 Jan 2021 07:20:27 +0000 (07:20 +0000)]
makemap does not need a common which it does not use.

3 years agocommons used rather than externs, fix for -fno-common
deraadt [Wed, 27 Jan 2021 07:19:54 +0000 (07:19 +0000)]
commons used rather than externs, fix for -fno-common

3 years agofix -fno-common issues; ok mortimer
deraadt [Wed, 27 Jan 2021 07:18:41 +0000 (07:18 +0000)]
fix -fno-common issues; ok mortimer

3 years agofix -fno-common issues; ok mortimer
deraadt [Wed, 27 Jan 2021 07:18:16 +0000 (07:18 +0000)]
fix -fno-common issues; ok mortimer

3 years agonsd contains two yacc parsers, but predates "yacc -b". Instead a
deraadt [Wed, 27 Jan 2021 05:06:12 +0000 (05:06 +0000)]
nsd contains two yacc parsers, but predates "yacc -b".  Instead a
script renames the fields in one parser.  Three additional variables
(yysslim, yyssp, yystacksize) need to be renamed also.
Yes it is worse than stepping out of bed on the wrong side into cat vomit.

3 years agoshuffle externs (and definitions) around to satisfy -fno-common
deraadt [Wed, 27 Jan 2021 05:03:23 +0000 (05:03 +0000)]
shuffle externs (and definitions) around to satisfy -fno-common
ok mortimer

3 years agohave pf_route{,6} clear the pf_pdesc mbuf ref early for route-to/reply-to.
dlg [Wed, 27 Jan 2021 04:46:21 +0000 (04:46 +0000)]
have pf_route{,6} clear the pf_pdesc mbuf ref early for route-to/reply-to.

pf_route and pf_route6 are called to take over delivery of the
packet with route-to and reply-to instead of letting it get processed
normally. for the dup-to handling, it copies the mbuf but leaves
the original mbuf in place. pf_route takes over the packet by
clearing the mbuf pointer in the pf_pdesc struct. this diff moves
the clearing of that pointer to the start of the function, rather
than checking for dup-to again on the way out of the function.

i think this is better because it means that it's more robust in
the face of future code changes. even if that's not true, it's still
shorter code in a forwarding path.

ok sashan@ jmatthew@

3 years agodon't run copies of packets made by dup-to through pf_test.
dlg [Wed, 27 Jan 2021 03:02:06 +0000 (03:02 +0000)]
don't run copies of packets made by dup-to through pf_test.

dup-to is kind of like what you do with a span port, but is a bit
more fine grained. it copies packets in a connection out an interface
so that connection can be monitored. it doesnt make sense for pf
to see the copied packets and try to match or create new states for
them either. at best it needs config to stop pf seeing the copies
(eg, set skip on $dup_to_tgt_if). at worst it breaks the connections
you're monitoring because the states in pf get confused.

found while discussing larger route-to changes on tech@.

ok bluhm@ sashan@

3 years agokqueue: Fix termination assert
visa [Wed, 27 Jan 2021 02:58:03 +0000 (02:58 +0000)]
kqueue: Fix termination assert

When a kqueue file is closed, the kqueue can still have threads
scanning it. Consequently, kqueue_terminate() can see scan markers
in the event queue. These markers are removed when the scanning threads
leave the kqueue. Take this into account when checking the queue's
state, to avoid a panic when kqueue is closed from under a thread.

OK anton@

Reported-by: syzbot+757c60a2aa1125137cce@syzkaller.appspotmail.com
3 years agosatisfy -fno-common by duplicating deck chairs as required
deraadt [Wed, 27 Jan 2021 01:59:39 +0000 (01:59 +0000)]
satisfy -fno-common by duplicating deck chairs as required
ok mortimer millert

3 years agosatisfy -fno-common
deraadt [Wed, 27 Jan 2021 01:57:37 +0000 (01:57 +0000)]
satisfy -fno-common
similar to the approach used by mortimer

3 years agoLogical not bitwise or. ok djm@
dtucker [Wed, 27 Jan 2021 00:37:26 +0000 (00:37 +0000)]
Logical not bitwise or.  ok djm@

3 years agoAdd support for RSA-PSS PKCS1 signatures. Don't enable them by
tobhe [Tue, 26 Jan 2021 23:06:23 +0000 (23:06 +0000)]
Add support for RSA-PSS PKCS1 signatures.  Don't enable them by
default for now because of interoperability issues.

ok patrick@

3 years agoRecognize Apple Icestorm cores.
kettenis [Tue, 26 Jan 2021 23:02:18 +0000 (23:02 +0000)]
Recognize Apple Icestorm cores.

3 years agoFix build with -fno-common. OK deraadt@
millert [Tue, 26 Jan 2021 20:42:49 +0000 (20:42 +0000)]
Fix build with -fno-common.  OK deraadt@

3 years agoRewrap a comment line to fit into 80 columns.
tb [Tue, 26 Jan 2021 18:47:08 +0000 (18:47 +0000)]
Rewrap a comment line to fit into 80 columns.

3 years agozap a tab
tb [Tue, 26 Jan 2021 18:45:32 +0000 (18:45 +0000)]
zap a tab

3 years agoPrepare to provide SSL_set_hostflags()
tb [Tue, 26 Jan 2021 18:43:41 +0000 (18:43 +0000)]
Prepare to provide SSL_set_hostflags()

Yet another one of these X509_VERIFY_PARAM reacharounds into
libcrypto. Recently found in imapfilter, also used elsewhere.
Will be made publicly visible with the next minor bump.

ok jsing

3 years agoone variable was common, fixing what I can.
deraadt [Tue, 26 Jan 2021 18:25:07 +0000 (18:25 +0000)]
one variable was common, fixing what I can.
(the portable code in here is not in great shape, and I am ignoring it)

3 years agosatisfy -fno-common, by (1) copying all the variable decls from
deraadt [Tue, 26 Jan 2021 18:23:49 +0000 (18:23 +0000)]
satisfy -fno-common, by (1) copying all the variable decls from
indent_globs.h to indent.c, and (2) changing all the same decls in
indent_globs.h to be extern
ok mortimer

3 years agosatisfy -fno-common, by (1) copying all the variable decls from
deraadt [Tue, 26 Jan 2021 18:22:45 +0000 (18:22 +0000)]
satisfy -fno-common, by (1) copying all the variable decls from
indent_globs.h to indent.c, and (2) changing all the same decls in
indent_globs.h to be extern
ok mortimer