openbsd
7 years agoAdd missing length checks to make sure we don't dereference a pointer
millert [Fri, 8 Dec 2017 17:26:42 +0000 (17:26 +0000)]
Add missing length checks to make sure we don't dereference a pointer
past the mmap(2)'d buffer.  Otherwise, locate will read a single
byte past the end of the buffer.  This is often harmless, but if
the length of the buffer is an even multiple of the page size,
locate will crash.  OK tb@ espie@ deraadt@

7 years agoConvert snprintf+write into dprintf. It is simply easier to read, and
deraadt [Fri, 8 Dec 2017 17:04:14 +0000 (17:04 +0000)]
Convert snprintf+write into dprintf.  It is simply easier to read, and
provides retry on short-write file descriptors.
ok florian, previous versions seen by millert

7 years agoremove description of 'at' field which was removed from vmstat.c -r1.21
jasper [Fri, 8 Dec 2017 09:45:05 +0000 (09:45 +0000)]
remove description of 'at' field which was removed from vmstat.c -r1.21

7 years agoDisable SMAP temporarily to display userland traces.
mpi [Fri, 8 Dec 2017 08:54:03 +0000 (08:54 +0000)]
Disable SMAP temporarily to display userland traces.

ok visa@, deraadt@, mlarkin@, jasper@

7 years agoalso cleanout ld.so.a
deraadt [Fri, 8 Dec 2017 05:30:16 +0000 (05:30 +0000)]
also cleanout ld.so.a

7 years agoEveryone knows this as ld.so, nor by the ancient name rtld.
deraadt [Fri, 8 Dec 2017 05:25:20 +0000 (05:25 +0000)]
Everyone knows this as ld.so, nor by the ancient name rtld.
ok guenther

7 years agotime_t printing needs %lld and (long long) casts
deraadt [Fri, 8 Dec 2017 03:45:52 +0000 (03:45 +0000)]
time_t printing needs %lld and (long long) casts
ok djm

7 years agofix ordering in previous to ensure errno isn't clobbered before
djm [Fri, 8 Dec 2017 02:14:33 +0000 (02:14 +0000)]
fix ordering in previous to ensure errno isn't clobbered before
logging.

7 years agofor some reason unix_listener() logged most errors twice with each
djm [Fri, 8 Dec 2017 02:13:02 +0000 (02:13 +0000)]
for some reason unix_listener() logged most errors twice with each
message containing only some of the useful information; merge these

7 years agoFix the return value of fwscanf(3) when encountering an early matching
kevlo [Fri, 8 Dec 2017 01:03:51 +0000 (01:03 +0000)]
Fix the return value of fwscanf(3) when encountering an early matching
failure.  This change brings fwscanf(3) back in line with fscanf(3).

From FreeBSD; ok deraadt@, millert@

7 years agoChange the SA payload parser to parse more than the first proposal. This
patrick [Thu, 7 Dec 2017 22:47:28 +0000 (22:47 +0000)]
Change the SA payload parser to parse more than the first proposal.  This
allows us to select one of the peer's proposals (and not only the first).

ok sthen@ hshoexer@

7 years agoadjust the "timeout" text, now that leases are no longer
jmc [Thu, 7 Dec 2017 21:47:22 +0000 (21:47 +0000)]
adjust the "timeout" text, now that leases are no longer
specified in dhclient.conf;

ok krw

7 years agocorrect indentation
deraadt [Thu, 7 Dec 2017 20:38:15 +0000 (20:38 +0000)]
correct indentation

7 years agoSet ifi->offer to NULL after free'ing it.
krw [Thu, 7 Dec 2017 19:17:13 +0000 (19:17 +0000)]
Set ifi->offer to NULL after free'ing it.

7 years agoNuke support for defining last-gasp leases in dhclient.conf.
krw [Thu, 7 Dec 2017 19:03:15 +0000 (19:03 +0000)]
Nuke support for defining last-gasp leases in dhclient.conf.

7 years agoInitialize tcp_secret in tcp_init
mikeb [Thu, 7 Dec 2017 16:52:21 +0000 (16:52 +0000)]
Initialize tcp_secret in tcp_init

The initialization of a secret SHA256 context for generating TCP
initial sequence numbers is moved out of tcp_set_iss_tsm used to
set up ISN for new connections and into tcp_init, sparing the
need for a global flag.

OK deraadt, visa, mpi

7 years ago* clean up macro usage: use .Ar for command arguments, .Cm for fixed
schwarze [Thu, 7 Dec 2017 15:43:03 +0000 (15:43 +0000)]
* clean up macro usage: use .Ar for command arguments, .Cm for fixed
strings to be used in commands, and .Li for example strings
* clarify what uses the two environment variables, and that only these
two are ignored for issetugid(2) programs
triggered by a question from Jan Stary <hans at stare dot cz>
feedback and OK ratchov@

7 years agoIn iwm(4), keep scanning if net80211 asks for a SCAN->SCAN transition
stsp [Thu, 7 Dec 2017 14:13:05 +0000 (14:13 +0000)]
In iwm(4), keep scanning if net80211 asks for a SCAN->SCAN transition
and the firmware is no longer busy scanning.

Fixes 'ifconfig iwm0 scan' returning no results after resume far away
from the currently configured AP.

ok phessler@

7 years agoMake iwm_newstate() recover from state transition errors.
stsp [Thu, 7 Dec 2017 14:12:39 +0000 (14:12 +0000)]
Make iwm_newstate() recover from state transition errors.

On error, we now schedule the init task which will whack the interface when
it gets to run, which prevents the driver from stalling in such situations.

ok phessler@

7 years agoSet the correct ENCAPSULATION_MODE when doing NAT-T.
mpi [Thu, 7 Dec 2017 11:44:02 +0000 (11:44 +0000)]
Set the correct ENCAPSULATION_MODE when doing NAT-T.

Fix at least interoperability with Cisco when isakmpd(8) is initiating
the connections, originally reported by sebastia@ in 2014.

Refreshed diff from and ok hshoexer@, ok sthen@, ok remi@

7 years agoMake the command formatting more consistent.
martijn [Thu, 7 Dec 2017 09:52:26 +0000 (09:52 +0000)]
Make the command formatting more consistent.
s/with/width type-O fix while here.

From kshe59 <at> zoho <dot> eu
OK jmc@

7 years agozap a few stray backslashes from the time thesse two were #defines; from
otto [Thu, 7 Dec 2017 06:34:05 +0000 (06:34 +0000)]
zap a few stray backslashes from the time thesse two were #defines; from
Ilya Kaliman

7 years agoNow that we have RB_NFIND, the canacar's trick with RB_INSERT+RB_NEXT
zhuk [Thu, 7 Dec 2017 05:21:57 +0000 (05:21 +0000)]
Now that we have RB_NFIND, the canacar's trick with RB_INSERT+RB_NEXT
is not needed anymore.

okay jmatthew@

7 years agoclient_addr_init() never fails and its return value is never checked,
zhuk [Thu, 7 Dec 2017 05:09:27 +0000 (05:09 +0000)]
client_addr_init() never fails and its return value is never checked,
so just make it void.

okay jmatthew@

7 years agoFix a potential fd leak in client_aldap_open().
zhuk [Thu, 7 Dec 2017 05:06:08 +0000 (05:06 +0000)]
Fix a potential fd leak in client_aldap_open().

okay jmatthew@

7 years agoLet it compile again.
krw [Thu, 7 Dec 2017 02:08:44 +0000 (02:08 +0000)]
Let it compile again.

7 years agoreorder some port numbers, no functional change.
mlarkin [Thu, 7 Dec 2017 01:54:39 +0000 (01:54 +0000)]
reorder some port numbers, no functional change.

7 years agoDrop the unused second argument from set_prompt(). It used to be used for
tb [Thu, 7 Dec 2017 01:54:33 +0000 (01:54 +0000)]
Drop the unused second argument from set_prompt(). It used to be used for
early special casing of ! and !! in the PS1 expansion. This was removed
from set_prompt() as part of the implementaion of the character count
toggles \[ and \] back in 2004.

ok jca

7 years agobe consistent in where we call fflush
espie [Wed, 6 Dec 2017 17:15:43 +0000 (17:15 +0000)]
be consistent in where we call fflush

okay millert@

7 years agoUpdate inaccurate comment: i386_has_xcrypt => amd64_has_xcrypt.
fcambus [Wed, 6 Dec 2017 16:26:12 +0000 (16:26 +0000)]
Update inaccurate comment: i386_has_xcrypt => amd64_has_xcrypt.

7 years agoImplement support for using interrupt cookies in vbus(4) and vpci(4) as
kettenis [Wed, 6 Dec 2017 16:20:53 +0000 (16:20 +0000)]
Implement support for using interrupt cookies in vbus(4) and vpci(4) as
introduced in version 3.0 of the Interrupt APIs group.  This makes it possible
boot OpenBSD on SPARC T7/M7 hardware (although there still may be issues with
the onboard mpii(4) controller).

7 years agoDisentangle dhclient.conf static lease handling from dynamic
krw [Wed, 6 Dec 2017 13:57:27 +0000 (13:57 +0000)]
Disentangle dhclient.conf static lease handling from dynamic
lease handling. Simplifies code and makes it easier to
consider excising this 'feature'.

7 years agostrdup -> bstrdup; from Michael W. Bombardieri
otto [Wed, 6 Dec 2017 13:48:05 +0000 (13:48 +0000)]
strdup -> bstrdup; from Michael W. Bombardieri

7 years agoMake vmd respect owner when starting non-disabled vms.
abieber [Wed, 6 Dec 2017 13:29:02 +0000 (13:29 +0000)]
Make vmd respect owner when starting non-disabled vms.

OK pd@, benno@

7 years agoIt's the imsg_compose(3) who accepts 'fd' argument, not imsg_create(3).
zhuk [Wed, 6 Dec 2017 12:07:08 +0000 (12:07 +0000)]
It's the imsg_compose(3) who accepts 'fd' argument, not imsg_create(3).

7 years agodon't accept junk after "yes" or "no" responses to hostkey prompts.
djm [Wed, 6 Dec 2017 05:06:21 +0000 (05:06 +0000)]
don't accept junk after "yes" or "no" responses to hostkey prompts.
bz#2803 reported by Maksim Derbasov; ok dtucker@

7 years agoReplace atoi and strtol conversions for integer arguments to config
dtucker [Tue, 5 Dec 2017 23:59:47 +0000 (23:59 +0000)]
Replace atoi and strtol conversions for integer arguments to config
keywords with a checking wrapper around strtonum.  This will prevent
and flag invalid and negative arguments to these keywords.  ok djm@

7 years agoAdd missing break for rdomain. Prevents spurious "Deprecated option"
dtucker [Tue, 5 Dec 2017 23:56:07 +0000 (23:56 +0000)]
Add missing break for rdomain.  Prevents spurious "Deprecated option"
warnings.  ok djm@

7 years agoregen
kettenis [Tue, 5 Dec 2017 22:27:54 +0000 (22:27 +0000)]
regen

7 years agoAdd SPARC-M7 PCIe; rename existing SPARC PCIe entries.
kettenis [Tue, 5 Dec 2017 22:26:31 +0000 (22:26 +0000)]
Add SPARC-M7 PCIe; rename existing SPARC PCIe entries.

7 years agoRemove DEF_STRONG(__cxa_thread_atexit_impl). This produces an unwanted
kettenis [Tue, 5 Dec 2017 21:11:10 +0000 (21:11 +0000)]
Remove DEF_STRONG(__cxa_thread_atexit_impl).  This produces an unwanted
_libc___cxa_thread_atexit_impl reference on gcc architectures that breaks
the build.

7 years agoHandle 64-bit-address Memory Space.
kettenis [Tue, 5 Dec 2017 21:04:32 +0000 (21:04 +0000)]
Handle 64-bit-address Memory Space.

7 years agoUse clock_gettime(CLOCK_MONOTONIC) to schedule timers
jca [Tue, 5 Dec 2017 20:31:45 +0000 (20:31 +0000)]
Use clock_gettime(CLOCK_MONOTONIC) to schedule timers

From Scott Cheloha, ok tb@

7 years agoadd missing blank before punctuation;
jmc [Tue, 5 Dec 2017 19:40:16 +0000 (19:40 +0000)]
add missing blank before punctuation;

7 years agosync
deraadt [Tue, 5 Dec 2017 18:36:02 +0000 (18:36 +0000)]
sync

7 years agodocument PORTS_PRIVSEP now that it's nearing completion
espie [Tue, 5 Dec 2017 17:58:10 +0000 (17:58 +0000)]
document PORTS_PRIVSEP now that it's nearing completion

7 years agoFix a case where we could go off the end of the buffer.
millert [Tue, 5 Dec 2017 17:47:09 +0000 (17:47 +0000)]
Fix a case where we could go off the end of the buffer.
Crash found by Sergey Bronnikov using afl-fuzz.
Based on a diff from and OK by espie@

7 years agoShow board ID and revision in dmesg to ease the identification
visa [Tue, 5 Dec 2017 15:39:26 +0000 (15:39 +0000)]
Show board ID and revision in dmesg to ease the identification
of system model. The early boot code already prints them, but
that output is not buffered and tends to be left out from
dmesg submissions.

7 years agoDrop cn30xxpow_intr_establish(), cn30xxpow_intr() and some other
visa [Tue, 5 Dec 2017 15:26:47 +0000 (15:26 +0000)]
Drop cn30xxpow_intr_establish(), cn30xxpow_intr() and some other
unused code. POW interrupts are now handled in if_cnmac.c.

7 years agoSeperate real and user timer interfaces
jca [Tue, 5 Dec 2017 15:02:06 +0000 (15:02 +0000)]
Seperate real and user timer interfaces

Use more descriptive names, and make it clearer that real and user
timers work on different static storage.  The end goal is to be able to
reuse those timer functions, instead of inlining other timer
implementations subject to clock jumps.

Discussed with Scott Cheloha

7 years agoWhen removing duplicate dynamic leases from the cache, compare the
krw [Tue, 5 Dec 2017 14:57:14 +0000 (14:57 +0000)]
When removing duplicate dynamic leases from the cache, compare the
SSID against ifi->ssid, not the SSID of the new lease. They
should be the same, but this makes the intent clearer and removes
an assumption about the contents of ifi->active.

7 years agostrip_comments is also called for dot lines, so sometimes the comment
espie [Tue, 5 Dec 2017 14:35:12 +0000 (14:35 +0000)]
strip_comments is also called for dot lines, so sometimes the comment
is all the line.

problem reported by Sergey Bronnikov

7 years agouse a global BN_CTX; from kshe with a twist from myself
otto [Tue, 5 Dec 2017 14:05:22 +0000 (14:05 +0000)]
use a global BN_CTX; from kshe with a twist from myself

7 years agoImplement __cxa_thread_atexit to support C++11 thread_local scope. The
kettenis [Tue, 5 Dec 2017 13:45:31 +0000 (13:45 +0000)]
Implement __cxa_thread_atexit to support C++11 thread_local scope.  The
interface is also made available as __cxa_thread_atexit_impl to satisfy the
needs of GNU libstdc++.

ok guenther@, millert@

7 years agoWhen sending out a proposal we create an SA/SPI for the Child SAs if we
patrick [Tue, 5 Dec 2017 09:06:53 +0000 (09:06 +0000)]
When sending out a proposal we create an SA/SPI for the Child SAs if we
are an initiator and store the information on the proposal, because we
only had one proposal so far.  This changes the code to only create one
SA on the first proposal and then apply the SPI to all other proposals
as well.

ok markus@

7 years agoadjust for warning: warning repairs
deraadt [Tue, 5 Dec 2017 06:05:39 +0000 (06:05 +0000)]
adjust for warning: warning repairs

7 years agoinclude the addr:port in bind/listen failure messages
djm [Tue, 5 Dec 2017 01:30:19 +0000 (01:30 +0000)]
include the addr:port in bind/listen failure messages

7 years agoSadly the firmware on SPARC T7 machines omits the executable bit on mappings
kettenis [Mon, 4 Dec 2017 22:06:21 +0000 (22:06 +0000)]
Sadly the firmware on SPARC T7 machines omits the executable bit on mappings
that contain code, just like some sun4u machines.  So add it for sun4v as
well when entering the mappings into the kernel pmap.

7 years agoUse _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).
mpi [Mon, 4 Dec 2017 21:12:41 +0000 (21:12 +0000)]
Use _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).

Missed in previous, found by deraadt@, ok visa@

7 years agoRemove duplicate check that never could execute because the exact same
patrick [Mon, 4 Dec 2017 17:22:39 +0000 (17:22 +0000)]
Remove duplicate check that never could execute because the exact same
condition is handled a line before.

7 years agoConsistently log "malformed payload" instead of "payload malformed", and
patrick [Mon, 4 Dec 2017 17:03:43 +0000 (17:03 +0000)]
Consistently log "malformed payload" instead of "payload malformed", and
replace "minimal" with "minimum".

7 years agoRemove check that is now a duplicate due to recent refactoring.
patrick [Mon, 4 Dec 2017 16:57:40 +0000 (16:57 +0000)]
Remove check that is now a duplicate due to recent refactoring.

7 years agoThe payloads are layered like onions, so you can validate one layer and
patrick [Mon, 4 Dec 2017 16:52:16 +0000 (16:52 +0000)]
The payloads are layered like onions, so you can validate one layer and
then call the next one, which can then validate itself.  Thing is, most
layers try to run validations on the upper layer, which is not useful
and rather confusing.  This cleans it up.

First change is that the generic payload parser does not anymore pass
the length of the whole datagram, including all remaining payloads, but
passes only the length of the specific payload to the specific payload
parser.  Second change is that the payload validators don't check the
length of the upper layer, but only verify their own lengths.

Diff discussed with hshoexer@ and sthen@
Tested by sthen@

7 years agoRFC 4861 requires that all neighbor discovery packets have 255 in
bluhm [Mon, 4 Dec 2017 15:13:12 +0000 (15:13 +0000)]
RFC 4861 requires that all neighbor discovery packets have 255 in
their IPv6 header hop limit field.  Let pf drop neighbor solicitation,
neighbor advertisement, router solicitation, router advertisement,
and redirect ICMP6 packets that do not comply.  This enforces that
bogus packets cannot be routed when pf is enabled.
OK mpi@ sashan@ benno@

7 years agochange "if (lp &&" to "if lp != NULL &&".
tb [Mon, 4 Dec 2017 15:00:03 +0000 (15:00 +0000)]
change "if (lp &&" to "if lp != NULL &&".

pointed out by krw

7 years agoadd the alps touchpad that can be found in the ideapad 710s
robert [Mon, 4 Dec 2017 14:56:47 +0000 (14:56 +0000)]
add the alps touchpad that can be found in the ideapad 710s

ok mpi@

7 years agoAvoid a NULL-deref in get_recorded_lease() leading to a segfault seen
tb [Mon, 4 Dec 2017 14:56:07 +0000 (14:56 +0000)]
Avoid a NULL-deref in get_recorded_lease() leading to a segfault seen
by aja and others.

ok krw

7 years agoInitialize variable, otherwise the pointer might contain stack garbage.
patrick [Mon, 4 Dec 2017 14:35:03 +0000 (14:35 +0000)]
Initialize variable, otherwise the pointer might contain stack garbage.

7 years agoMake divert lookup similar for all socket types. If PF_TAG_DIVERTED
bluhm [Mon, 4 Dec 2017 13:40:34 +0000 (13:40 +0000)]
Make divert lookup similar for all socket types.  If PF_TAG_DIVERTED
is set, pf_find_divert() cannot fail so put an assert there.
Explicitly check all possible divert types, panic in the default
case.  For raw sockets call pf_find_divert() before of the socket
loop.  Divert reply should not match on TCP or UDP listen sockets.
OK sashan@ visa@

7 years agoChange __mp_lock_held() to work with an arbitrary CPU info structure and
mpi [Mon, 4 Dec 2017 09:51:03 +0000 (09:51 +0000)]
Change __mp_lock_held() to work with an arbitrary CPU info structure and
extend ddb(4) "ps /o" output to print which CPU is currently holding the
KERNEL_LOCK().

Tested by dhill@, ok visa@

7 years agoUse _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).
mpi [Mon, 4 Dec 2017 09:38:20 +0000 (09:38 +0000)]
Use _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).

ok visa@

7 years agoIf we wanted to send out more proposals than just one, we need to set a
patrick [Sun, 3 Dec 2017 21:02:44 +0000 (21:02 +0000)]
If we wanted to send out more proposals than just one, we need to set a
flag in the SA header that there is another proposal coming.  The "more"
attribute borrows its values, as specified in the RFC, from IKEv1.

ok sthen@

7 years agoThe RFC specifies that to accept a proposal, we must select a transform
patrick [Sun, 3 Dec 2017 21:02:06 +0000 (21:02 +0000)]
The RFC specifies that to accept a proposal, we must select a transform
for each transform type.  We do some sanity checks, for instance we do
require an encryption transform for ESP, but that's not enough.  We need
to check that for every proposed transform type we have found a matching
transform in our own proposal.

ok sthen@

7 years agoMove timer fields 'expiry" and "rebind" out of struct client_lease
krw [Sun, 3 Dec 2017 20:53:28 +0000 (20:53 +0000)]
Move timer fields 'expiry" and "rebind" out of struct client_lease
and into struct interface_info. Nuke set_lease_times().

7 years agoDisallow the _pbuild user from making TCP/UDP connections in the default
sthen [Sun, 3 Dec 2017 20:40:04 +0000 (20:40 +0000)]
Disallow the _pbuild user from making TCP/UDP connections in the default
PF ruleset. This is not a complete block on _pbuild being able to communicate
(e.g. non-TCP/UDP protocols don't have a PCB with userid, so PF can't restrict
in those cases) but avoids some cases, and in particular makes it more obvious
when a port does things like download extra distfiles or dependencies
as part of the build process. Slight tweak from a diff by espie@.

7 years agoEnable bgw(4).
kettenis [Sun, 3 Dec 2017 19:44:04 +0000 (19:44 +0000)]
Enable bgw(4).

7 years agoEnumerate all i2c devices on the bus. Mark their nodes as attached even
kettenis [Sun, 3 Dec 2017 19:42:20 +0000 (19:42 +0000)]
Enumerate all i2c devices on the bus.  Mark their nodes as attached even
if we didn't attach a device driver to avoid enumerating them again in
the acpi device tree walk.

ok deraadt@

7 years agopledge(2) elfrdsetroot:
tb [Sun, 3 Dec 2017 19:32:19 +0000 (19:32 +0000)]
pledge(2) elfrdsetroot:

- pledge(2) "stdio" after managing arguments (opening files)
- add $OpenBSD$ markers on elfrd_size.c and elfrdsetroot.h
- add a check for NULL on malloc(3) call in elfrd_size.c

from semarie, ok deraadt

7 years agoAbandon nagging about "_" violating RFC 952. This removes the need
krw [Sun, 3 Dec 2017 16:09:14 +0000 (16:09 +0000)]
Abandon nagging about "_" violating RFC 952. This removes the need
for a custom res_hnok(), so  just use the libc version of res_hnok().

Requested by deraadt@

7 years agoRename ci_number to ci_cpuid to match other archs.
mpi [Sun, 3 Dec 2017 10:55:50 +0000 (10:55 +0000)]
Rename ci_number to ci_cpuid to match other archs.

ok visa@, kettenis@, deraadt@

7 years agoInclude dtbs for Wandboard rev D1 including the i.MX 6QuadPlus variant.
jsg [Sun, 3 Dec 2017 10:34:30 +0000 (10:34 +0000)]
Include dtbs for Wandboard rev D1 including the i.MX 6QuadPlus variant.
Requires U-Boot >= 2017.11 and dtb >= 4.15-rc1.

7 years agosync
jsg [Sun, 3 Dec 2017 03:16:45 +0000 (03:16 +0000)]
sync

7 years agosync
deraadt [Sat, 2 Dec 2017 18:40:43 +0000 (18:40 +0000)]
sync

7 years agoAdapt to change in 0Z
otto [Sat, 2 Dec 2017 12:43:54 +0000 (12:43 +0000)]
Adapt to change in 0Z

7 years agomake 0Z do what the original dc and gnu bcc do; ok tom@
otto [Sat, 2 Dec 2017 12:43:18 +0000 (12:43 +0000)]
make 0Z do what the original dc and gnu bcc do; ok tom@

7 years agopost-patch -> pre-configure
ajacoutot [Sat, 2 Dec 2017 09:31:52 +0000 (09:31 +0000)]
post-patch -> pre-configure

7 years agoAdd a caveat wrt use of non-decimal fractional notation; from kshe; ok jmc@
otto [Sat, 2 Dec 2017 07:35:46 +0000 (07:35 +0000)]
Add a caveat wrt use of non-decimal fractional notation; from kshe; ok jmc@

7 years agoswitching to _pbuild is tricky, you can't take it back.
espie [Sat, 2 Dec 2017 00:52:47 +0000 (00:52 +0000)]
switching to _pbuild is tricky, you can't take it back.
in particular, disable future PORTS_PRIVSEP mechanisms under
pkg_create, because we should already be running as _pbuild
by this point.

7 years agoRedo the calculation of the alignment and placement of static TLS data to
guenther [Fri, 1 Dec 2017 23:30:05 +0000 (23:30 +0000)]
Redo the calculation of the alignment and placement of static TLS data to
correctly take into account the segment p_align.  Previously, anything
with a size belong the natural alignment or with alignment larger than
the natural one would either not be intialized correctly, be misaligned,
or result in the TIB being misaligned.

Problems reported by Charles Collicutt (charles (at) collicutt.co.uk)
ok kettenis@

7 years agoThe RFC specifies that in an SA payload the proposals must be numbered
patrick [Fri, 1 Dec 2017 20:19:05 +0000 (20:19 +0000)]
The RFC specifies that in an SA payload the proposals must be numbered
starting with number 1.  Subsequent proposals must be one more than the
previous proposal.

ok sthen@

7 years agoTurns out that, as specified in the RFC, the initial Child SA does not
patrick [Fri, 1 Dec 2017 19:49:31 +0000 (19:49 +0000)]
Turns out that, as specified in the RFC, the initial Child SA does not
do PFS and is assumed to be secured using the DH exchange in the first
handshake.  Thus there is no KE/N payload in the IKE_AUTH exchange and
we must not include a DH group other than None, which essentially means
we must not supply any DH transforms in the IKE_AUTH messages.  So now
we skip adding the DH transforms for initiating and responding to
IKE_AUTH messages.

ok sthen@

7 years agofix buglet in split_number() and optimize count_digits();
otto [Fri, 1 Dec 2017 19:04:15 +0000 (19:04 +0000)]
fix buglet in split_number() and optimize count_digits();
from kshe with a twist from myself; ok tb@

7 years agoarm64 is now also a _syspatch_arch
tb [Fri, 1 Dec 2017 18:19:30 +0000 (18:19 +0000)]
arm64 is now also a _syspatch_arch

7 years agoIn the macppc installer, switch the default answer for the partition
stsp [Fri, 1 Dec 2017 18:13:48 +0000 (18:13 +0000)]
In the macppc installer, switch the default answer for the partition
table question from "HFS" to "MBR". Most people will want to run
OpenBSD exclusively on such machines these days.
ok kettenis@

7 years agoAdd quotes around the name of (unconfigured) devices like we do for other
kettenis [Fri, 1 Dec 2017 16:06:25 +0000 (16:06 +0000)]
Add quotes around the name of (unconfigured) devices like we do for other
iic(4) controllers.

ok jcs@

7 years agoAvoid using an uninitialized variable.
visa [Fri, 1 Dec 2017 14:42:23 +0000 (14:42 +0000)]
Avoid using an uninitialized variable.
Found by gcc.

OK jca@

7 years agoFix white spaces and shorten long line.
bluhm [Fri, 1 Dec 2017 12:40:58 +0000 (12:40 +0000)]
Fix white spaces and shorten long line.

7 years agoConsistently .Xr the corresponding wide char functions from char- and
schwarze [Fri, 1 Dec 2017 11:18:40 +0000 (11:18 +0000)]
Consistently .Xr the corresponding wide char functions from char- and
string-handling <stdio.h> functions, like we already do it for <string.h>.
Includes a smaller patch from <kshe59 at zoho dot eu>, OK jmc@.

7 years agoadd missing argument name; from <kshe59 at zoho dot eu>; OK jmc@;
schwarze [Fri, 1 Dec 2017 10:56:07 +0000 (10:56 +0000)]
add missing argument name; from <kshe59 at zoho dot eu>; OK jmc@;
while here, consistently use .Fo to cure execessive line lengths

7 years agoSimplify the reverse PCB lookup logic. The PF_TAG_TRANSLATE_LOCALHOST
bluhm [Fri, 1 Dec 2017 10:33:33 +0000 (10:33 +0000)]
Simplify the reverse PCB lookup logic.  The PF_TAG_TRANSLATE_LOCALHOST
security check prevents that the user accidentally configures
redirect where a divert-to would be appropriate.  Instead of spreading
the logic into tcp and udp input, check the flag during PCB listen
lookup.  This also reduces parameters of in_pcblookup_listen().
OK visa@