eric [Wed, 3 Oct 2018 11:47:17 +0000 (11:47 +0000)]
remove unused files
eric [Wed, 3 Oct 2018 11:43:57 +0000 (11:43 +0000)]
correctly handle "+a:..." entries
from gilles@
ok otto@ gilles@
denis [Wed, 3 Oct 2018 11:36:39 +0000 (11:36 +0000)]
add filter option based on origin validation state
OK claudio@
denis [Wed, 3 Oct 2018 06:57:36 +0000 (06:57 +0000)]
Update manual to reflect ROA changes
With input from claudio@, sthen@ and jmc@
OK claudio@ sthen@
djm [Wed, 3 Oct 2018 06:38:35 +0000 (06:38 +0000)]
Allow ssh_config IdentityAgent directive to accept environment variable
names as well as explicit paths. ok dtucker@
visa [Wed, 3 Oct 2018 01:24:14 +0000 (01:24 +0000)]
Fix a race condition that affects pfsync interface deletion.
When a pfsync interface is being deleted, all its timeout handlers and
pfsync_send_dispatch() have to stop accessing the software context
before the context is freed. Ensure sufficient synchronization by
acquiring NET_LOCK() and clearing `pfsyncif' inside the critical
section in pfsync_clone_destroy(). When a timeout handler has entered
the critical section, it has to check `pfsyncif' and bail out if the
value is NULL. pfsync_send_dispatch() already does this check.
Issue reported and fix tested by Hrvoje Popovski.
OK mpi@ bluhm@
sashan [Tue, 2 Oct 2018 23:44:39 +0000 (23:44 +0000)]
- pfsync: avoid a recursion on PF_LOCK
OK bluhm@
jsg [Tue, 2 Oct 2018 22:35:20 +0000 (22:35 +0000)]
sync
naddy [Tue, 2 Oct 2018 21:30:44 +0000 (21:30 +0000)]
Unify the MD byteswapping code as much as possible across architectures.
Use inline functions instead of GNU C statement expressions, and
make them available to userland. With clues from guenther@.
ok guenther@ kettenis@
stsp [Tue, 2 Oct 2018 19:49:10 +0000 (19:49 +0000)]
Make some USB ioctls return ENXIO, instead of EIO, if usbd_is_dying().
Brings us one step closer towards making this condition's error code
consistent across all USB drivers.
Patch by Moritz Buhl
ok mpi@ bluhm@
schwarze [Tue, 2 Oct 2018 19:43:27 +0000 (19:43 +0000)]
add DESCRIPTION and .Ss to the toc; suggested by espie@
schwarze [Tue, 2 Oct 2018 19:40:05 +0000 (19:40 +0000)]
enable the equivalent of -O toc in man.cgi(8)
reyk [Tue, 2 Oct 2018 16:42:38 +0000 (16:42 +0000)]
Fix potential rounding errors when calculating the qcow2 l1 and ref tables sizes
OK ccardenas@ mlarkin@
schwarze [Tue, 2 Oct 2018 14:56:36 +0000 (14:56 +0000)]
Add an option -T html -O toc to add a brief table of contents near
the top of HTML pages containing at least two non-standard sections.
Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
djm [Tue, 2 Oct 2018 12:51:58 +0000 (12:51 +0000)]
mention INFO@openssh.com for sending SIGINFO
djm [Tue, 2 Oct 2018 12:40:07 +0000 (12:40 +0000)]
Add server support for signalling sessions via the SSH channel/
session protocol. Signalling is only supported to sesssions that
are not subsystems and were not started with a forced command.
Long requested in bz#1424
Based on a patch from markus@ and reworked by dtucker@;
ok markus@ dtucker@
schwarze [Tue, 2 Oct 2018 12:32:55 +0000 (12:32 +0000)]
Support a second argument to -O man,
selecting the format according to local existence of the file.
Suggested by kristaps@ during EuroBSDCon 2018.
Written on the train Frankfurt-Karlsruhe returning from EuroBSDCon.
schwarze [Tue, 2 Oct 2018 12:14:44 +0000 (12:14 +0000)]
Render the eqn(7) "sqrt" function as U+221A in UTF-8 output.
This also agrees with what groff does.
Suggested by an attendee of EuroBSDCon 2018 in Bucuresti.
Written on the plane Bucuresti-Frankfurt returning from EuroBSDCon.
jmc [Tue, 2 Oct 2018 10:55:39 +0000 (10:55 +0000)]
document that uuid_create generates v4 uuids; from william orr
verified/ok tb
kevlo [Tue, 2 Oct 2018 02:05:34 +0000 (02:05 +0000)]
Add support for RT3290 chipset by James Hastings.
Tested by me and James Hastings.
job [Mon, 1 Oct 2018 23:09:53 +0000 (23:09 +0000)]
Expose BGP Origin Validation state in bgpctl show commands
OK denis@ claudio@
schwarze [Mon, 1 Oct 2018 22:58:43 +0000 (22:58 +0000)]
fix obvious pasto in the HISTORY section
mortimer [Mon, 1 Oct 2018 22:53:48 +0000 (22:53 +0000)]
Add retguard to arm64 ld.so.
ok kettenis@
mortimer [Mon, 1 Oct 2018 22:49:50 +0000 (22:49 +0000)]
Add retguard to arm64 libc syscalls and setjmp / longjmp.
ok kettenis@
jmatthew [Mon, 1 Oct 2018 22:37:18 +0000 (22:37 +0000)]
mention RTL8723AE
jmatthew [Mon, 1 Oct 2018 22:36:08 +0000 (22:36 +0000)]
add RTL8723AE support
ok kevlo@ stsp@
benno [Mon, 1 Oct 2018 22:23:36 +0000 (22:23 +0000)]
run the integrationtests/
benno [Mon, 1 Oct 2018 20:58:59 +0000 (20:58 +0000)]
add new testcase for network statements (announcing/redistributing routes
into bgpd).
kn [Mon, 1 Oct 2018 19:47:30 +0000 (19:47 +0000)]
Allow DIOCRGETADDRS when securelevel(7) > 1
This fixes certain operations such as `pfctl -t foo -T show' when the
system is in "Highly secure mode". `pfctl -t foo -T show -v' would already
work due to a different ioctl (DIOCRGETASTATS) being used.
Reported by Zbyszek Żółkiewski, thanks!
OK sthen sashan
benno [Mon, 1 Oct 2018 19:24:09 +0000 (19:24 +0000)]
Only send 408 Timeout responses when we have seen at least part of a
request. Without a request, just close the connection when we hit
request timeout.
Prompted by a bug report from Nikola Kolev, thanks.
ok reyk@ and some suggestions from claudio@ and bluhm@
naddy [Mon, 1 Oct 2018 17:42:16 +0000 (17:42 +0000)]
Use inline functions instead of GNU C statement expressions for the MD
byteswapping code.
ok guenther@ kettenis@
This fixes a corner case triggered by the comms/hylafax port where
htons() can't be compiled in C++ code:
"Don't know how to handle indirect register inputs yet for constraint 'r'"
reyk [Mon, 1 Oct 2018 17:34:56 +0000 (17:34 +0000)]
Fix potential double-free in error path
qc2_open() calls qc2_close() on error which already frees diskp.
OK ccardenas@
mpi [Mon, 1 Oct 2018 12:38:32 +0000 (12:38 +0000)]
Put bridge_input & output back under the KERNEL_LOCK().
Wireless drivers call if_enqueue() out of the NET_LOCK() so it cannot
be used to serialize bridge(4) states.
Found by stsp@, ok visa@
jmatthew [Mon, 1 Oct 2018 11:06:14 +0000 (11:06 +0000)]
regen
jmatthew [Mon, 1 Oct 2018 11:05:08 +0000 (11:05 +0000)]
add RTL8723AE
jmatthew [Mon, 1 Oct 2018 11:03:46 +0000 (11:03 +0000)]
The sequence number field in the 802.11 frame header includes the sequence
number and the fragment number, so shift it to get just the sequence number
for the tx descriptor. While here, add a #define for the flag in the same
field that enables hardware sequence numbering, and use existing constants
for some R92C_RSV_CTRL writes.
prompted by feedback from kevlo@ on another diff, tested on 8188CE, EE, EU
ok stsp@ kevlo@
reyk [Mon, 1 Oct 2018 09:31:15 +0000 (09:31 +0000)]
Try to derive the qcow2 file format from an image file automatically.
This makes the "-d qcow2:" and "format qcow" arguments optional as vmctl
and vmd will read the magic bytes at the beginning of a file to guess if
it is a raw or a qcow image file.
The "vmctl create" command has been changed by removing the -f qcow2 option
and replacing it with the same syntax as -d: "vmctl create qcow2:foo.img".
In a slightly ununixy but intended way, the create command now also
considers the file extension for the format as "vmctl create foo.qcow2"
creates a qcow2 disk and not a raw image file.
Ok mlarkin@ (and ccardenas@ on an earlier version of the diff)
schwarze [Mon, 1 Oct 2018 08:05:25 +0000 (08:05 +0000)]
Add missing URI encoding when writing HTTP redirects,
fixing a bug reported by <jungleboogie0 at gmail dot com> on bugs@.
While here, fully validate the arch name
such that we do not have to URI encode that one.
martijn [Mon, 1 Oct 2018 06:37:37 +0000 (06:37 +0000)]
As per POSIX, when str{,r}chr is comparing it should convert c to a char.
The C implementation of str{,r}chr are not linked to the build, because
assembly implementations are used, but change to code for easier reference.
At least the i386 and amd64 are checked and seem to do the correct thing.
Found thanks to the csh any/strchr change.
minor pointers and OK millert@
jmc [Mon, 1 Oct 2018 06:06:59 +0000 (06:06 +0000)]
update currency exchange rates;
solene [Sun, 30 Sep 2018 19:13:55 +0000 (19:13 +0000)]
Add size limitation of group-name and a reference to ifconfig about it
ok mlarkin@ jmc@ jca@
solene [Sun, 30 Sep 2018 18:58:17 +0000 (18:58 +0000)]
add spin lock in KERN_CPTIME cpu states
ok mpi@ jca@
guenther [Sun, 30 Sep 2018 18:46:09 +0000 (18:46 +0000)]
Delete the reserve_dumppages() declaration, missed in its 2010 removal
ok deraadt@
denis [Sun, 30 Sep 2018 18:19:24 +0000 (18:19 +0000)]
deny non-contiguous netmask
OK job@
deraadt [Sun, 30 Sep 2018 14:35:32 +0000 (14:35 +0000)]
telnet argv parsing overflow; from YangX92
ok millert
ajacoutot [Sun, 30 Sep 2018 13:29:24 +0000 (13:29 +0000)]
Remove the hopefully last remnants of kerberos in there: arg_login,
arg_notickets and invokinguser.
ok kn@ millert@
schwarze [Sun, 30 Sep 2018 13:24:32 +0000 (13:24 +0000)]
Make the HISTORY sections of the "intro" manuals less confusing and
more uniform; potential for confusion noticed by aalm@; OK jmc@.
schwarze [Sun, 30 Sep 2018 12:44:22 +0000 (12:44 +0000)]
For -w output in -m mode, tweak the handling of bytes that do not
form valid UTF-8: treat them as "not a whitespace character" and
hence "not a word boundary" in the same way as non-printable
characters and NUL bytes.
OK millert@
schwarze [Sun, 30 Sep 2018 12:35:40 +0000 (12:35 +0000)]
fix the rest of the bug mitigated in the previous commit:
do not embark on an infinite loop
when -m is given and the file contains a NUL character;
OK millert@
denis [Sun, 30 Sep 2018 10:56:47 +0000 (10:56 +0000)]
vstate might be used uninitialized
OK claudio@
tb [Sun, 30 Sep 2018 10:56:46 +0000 (10:56 +0000)]
in ECDH, gather statistics where it makes more sense
anton [Sun, 30 Sep 2018 09:14:43 +0000 (09:14 +0000)]
use a more common wording the authors section
vgross [Sun, 30 Sep 2018 08:26:40 +0000 (08:26 +0000)]
Add regression test for cmsg size bug.
With help and prodding from bluhm@, mpi@, jca@
and Alexander Markert.
bcook [Sun, 30 Sep 2018 02:35:23 +0000 (02:35 +0000)]
bump for LibreSSL 2.8.2
pd [Sat, 29 Sep 2018 22:33:09 +0000 (22:33 +0000)]
vmd: don't remove vm if sending failed
Fix a bug where a vm was removed in vmd.c after vmctl send even if sending
failed.
spotted by solene@
ok mlarkin@
benno [Sat, 29 Sep 2018 19:25:32 +0000 (19:25 +0000)]
Fix problems with redistribution of routes by route label.
Bug report from Jon Williams, jon AT jonwillia DOT ms, thanks.
ok claudio@
florian [Sat, 29 Sep 2018 17:17:54 +0000 (17:17 +0000)]
update to 4.1.25
OK sthen (on a slightly different configure script version)
florian [Sat, 29 Sep 2018 17:14:03 +0000 (17:14 +0000)]
I forgot to put this in with the 4.1.24 update.
It is of course not relevant for us but introduces a diff when
the configure script is regenerated on upgrades and this file is
not arround.
kettenis [Sat, 29 Sep 2018 16:29:12 +0000 (16:29 +0000)]
Allow preemption of functions with protected visibility. Disallowing this
makes no sense. Yes it breaks function address equality and therefore
the expectations of the standard C language. However declaring symbols
with protected visibility isn't standard C in the first place.
Fixes linking non-PIC/PIE code with lld on amd64.
ok millert@
anton [Sat, 29 Sep 2018 16:24:13 +0000 (16:24 +0000)]
test that PWD and OLDPWD are exported
cheloha [Sat, 29 Sep 2018 16:17:35 +0000 (16:17 +0000)]
Treat NUL like any other byte in the default case; aligns newline count
with that of the '-l' case.
From David Hines on bugs@.
ok millert@
deraadt [Sat, 29 Sep 2018 16:00:44 +0000 (16:00 +0000)]
unmark -beta. There is still development happening, and we aren't
locked in stone yet, but the clock starts ticking...
kn [Sat, 29 Sep 2018 15:53:07 +0000 (15:53 +0000)]
Zap dead/obsolete code
Flow labels used to be 24-bit back in 1995 until the IPv6 header format
changed in 1998 when the field size was reduced to 20-bit.
https://tools.ietf.org/html/rfc1883#section-6
https://tools.ietf.org/html/rfc2460#section-6
OK denis deraadt
millert [Sat, 29 Sep 2018 14:13:19 +0000 (14:13 +0000)]
Export the PWD and OLDPWD shell variables as per POSIX.
Previously, these would only be exported if they were present
in the environment when the shell started. OK deraadt@ anton@ kn@
claudio [Sat, 29 Sep 2018 08:14:42 +0000 (08:14 +0000)]
Adjust for the roa-set, origin-set commit that just happend in bgpd
claudio [Sat, 29 Sep 2018 08:13:56 +0000 (08:13 +0000)]
ROA_UNKNOWN is now ROA_NOTFOUND (as in the RFC).
claudio [Sat, 29 Sep 2018 08:11:11 +0000 (08:11 +0000)]
Implement origin validation in bgpd. This introduces two new tables, the
roa-set for RPKI based origin validation and a origin-set which allows to
lookup a source-as / prefix pair.
For RPKI a config can be built like this:
roa-set {
165.254.255.0/24 source-as 15562
193.0.0.0/21 maxlen 24 source-as 3333
}
deny from any ovs invalid
match from any ovs valid set community local-as:42
match from any ovs not-found set community local-as:43
Origin sets are similar but only match when the source-as / prefix pair is
valid.
match from any origin-set ARINDB set community local-as:44
Committing this now so that further work can be done in tree.
OK benno@, job@
claudio [Sat, 29 Sep 2018 07:58:06 +0000 (07:58 +0000)]
With the introduction of sets the config that is shipped to the RDE got
potentially much bigger. In bad cases the SE activated the config way
before the RDE which is not ideal. Introduce IMSG_RECONF_DRAIN which
acts as a barrier and ensures that both childs got all the config.
Only after that the IMSG_RECONF_DONE message is sent activating
the config in the childs more or less simultaneous.
OK benno@
claudio [Sat, 29 Sep 2018 07:43:36 +0000 (07:43 +0000)]
Introduce minimal tracking of announced prefixes. A per peer RB tree tracks
which prefixes were sent out as UPDATE. At withdraw time the RB tree can be
consulted to know if the withdraw actually needs to be sent to the peer.
This replaces the faulty heuristic that was used before and caused either
that unneeded withdraw to be sent or in the worst case failing to send a
necessary withdraw resulting in stuck routes.
OK benno@
jmc [Sat, 29 Sep 2018 05:42:38 +0000 (05:42 +0000)]
trim previous;
visa [Sat, 29 Sep 2018 04:29:48 +0000 (04:29 +0000)]
Use atomic operations to update vfc_refcount. Change the field's type
to unsigned int.
OK deraadt@
bluhm [Fri, 28 Sep 2018 19:01:52 +0000 (19:01 +0000)]
If tpcbench(8) is startet with -r0 it does not print statistics.
But there was still the header line. Make -r0 really quiet and
document the feature.
OK deraadt@
bluhm [Fri, 28 Sep 2018 18:57:37 +0000 (18:57 +0000)]
Always try to build packet reflector on remote machine. It may be
missing after reinstall.
millert [Fri, 28 Sep 2018 18:32:39 +0000 (18:32 +0000)]
Contrary to the sh manual, it is possible to modify the PWD variable
(and this is allowed by POSIX). OK deraadt@ kn@
mestre [Fri, 28 Sep 2018 18:21:52 +0000 (18:21 +0000)]
Add unveil(2) to sdiff(1) to the following files:
filename1 - given via args - read permission
filename2 - same as above
tmpdir - if TMPDIR env var is changed, or _PATH_TMP by default -
read/write/create/delete permissions
/usr/bin/diff - the default diff program - execute permission
_PATH_BSHELL - to spawn an EDITOR/VISUAL if -o is used - execute
permission
this diff only applies unveil(2) if -F is not used, meaning that we are not
changing the default diff program to be used since that way we would need to
find where the binary is whereas by default we are sure that the path is
/usr/bin/diff. this will be revisited at a later stage to cover all cases.
feedback and OK millert@ deraadt@
ratchov [Fri, 28 Sep 2018 18:21:31 +0000 (18:21 +0000)]
Explain how to enable audio recording.
help from solene, jmc, and schwarze
bluhm [Fri, 28 Sep 2018 18:21:26 +0000 (18:21 +0000)]
Fix white spaces.
mestre [Fri, 28 Sep 2018 14:03:14 +0000 (14:03 +0000)]
add missing unveil(2) of an arbitrary kernel (when -N is used), or _PATH_UNIX by
default, with read permissions.
report and fix provided by semarie@
OK deraadt@
ccardenas [Fri, 28 Sep 2018 13:39:57 +0000 (13:39 +0000)]
Add vlan and trunk to arm64's RAMDISK (amd64 parity)
OK deraadt@ and kettenis@
reyk [Fri, 28 Sep 2018 12:35:32 +0000 (12:35 +0000)]
Support vmd-internal's vmboot with qcow2 disk images.
OK mlarkin@
reyk [Fri, 28 Sep 2018 08:29:06 +0000 (08:29 +0000)]
Compress qcow2 open debug messages into a single line
Please avoid tabs and excessive multi-line information with log_debug
as it also goes to syslog.
No functional change.
reyk [Fri, 28 Sep 2018 08:23:43 +0000 (08:23 +0000)]
Fix copy-pasto to use maxmem instead of maxcpu
Reported by Greg Steuck
OK mlarkin@
schwarze [Fri, 28 Sep 2018 07:46:45 +0000 (07:46 +0000)]
Add a cross reference to sysctl(2) to SEE ALSO.
People reading the present page will almost certainly need it
because that's where all the sysctl variables are described.
mestre [Fri, 28 Sep 2018 06:48:59 +0000 (06:48 +0000)]
add unveil(2) to tcpdump(8)
The following files are opened in the privsep proc, with read permissions, and
therefore need to be unveiled:
- /etc/pf.os - for OS fingerprinting, but only unveiled if -o flag is used
- /etc/ethers - ether_ntohost(3)
- /etc/rpc - getrpcbynumber(3)
Additional files are also opened, but they are either opened before reaching
this code path, or are covered by pledge(2)'s dns promise.
shown and tested by a few people
OK brynet@ deraadt@
kevlo [Fri, 28 Sep 2018 02:38:38 +0000 (02:38 +0000)]
Move the unions into the rom struct which fixes Coverity CID
1473649 and
makes it more readable.
ok stsp@ and jmatthew@
mortimer [Fri, 28 Sep 2018 00:33:34 +0000 (00:33 +0000)]
Document retguard and options to disable it.
ok deraadt@
reyk [Thu, 27 Sep 2018 17:15:36 +0000 (17:15 +0000)]
Add vmctl stop -a [-fw] option to stop or terminate all running VMs.
This is also be used to simplify the vmd rc stop script.
OK mlarkin@ ccardenas@
claudio [Thu, 27 Sep 2018 15:53:14 +0000 (15:53 +0000)]
Add some extra curlies to make code more legible.
benno [Thu, 27 Sep 2018 13:48:00 +0000 (13:48 +0000)]
unbreak "inet" and "inet6" aliases in filters after rev. 1.333
ok claudio@
mpi [Thu, 27 Sep 2018 12:39:36 +0000 (12:39 +0000)]
Coherently name "struct bridge_iflist" variables `bif'.
ok visa@
mpi [Thu, 27 Sep 2018 12:36:57 +0000 (12:36 +0000)]
Make sure the L2 entry is cloned before dereferencing its parent.
RTF_LOCAL entries or static ARP entries don't have parents, so the logic
was incorrect. Note that it might be possible to extend the logic to work
with non-cloned L2 entries but the few use cases do not justify the
complexity (yet).
Problem reported & fix tested by Elie Bouttier.
ok bluhm@, visa@, claudio@
benno [Thu, 27 Sep 2018 12:34:06 +0000 (12:34 +0000)]
whitepspace fix
bluhm [Thu, 27 Sep 2018 09:11:09 +0000 (09:11 +0000)]
Sometimes make picked the wrong rule for the adapted disklabel
program. An absolute path seems to fix this.
bluhm [Thu, 27 Sep 2018 08:56:49 +0000 (08:56 +0000)]
Actually I missed the /usr/local default size change in disklabel(8).
Adjust expected output.
bluhm [Thu, 27 Sep 2018 08:33:25 +0000 (08:33 +0000)]
Document how syslogd(8) escapes characters in log lines.
input jmc@; OK sthen@
nicm [Thu, 27 Sep 2018 07:43:18 +0000 (07:43 +0000)]
Use same working directory rules for jobs as new windows rather than
always starting in home, GitHub issue 1488.
mestre [Thu, 27 Sep 2018 06:52:15 +0000 (06:52 +0000)]
add unveil(2) to vipw(8)
The files needed to be unveiled directly or indirectly via libutil are the
following:
- _PATH_MASTERPASSWD_LOCK - write/create permissions
- _PATH_MASTERPASSWD - read permission
- _PATH_BSHELL - execute permission
- _PATH_PWD_MKDB - execute permission
_PATH_MASTERPASSWD gets read and then _PATH_MASTERPASSWD_LOCK is created and
the content of the former is written on the latter. After this _PATH_BSHELL
spawns an EDITOR (vi(1) by default) and at the end then _PATH_PWD_MKDB is ran
to update the _PATH_MASTERPASSWD based in what was actually changed in
_PATH_MASTERPASSWD_LOCK.
OK deraadt@
cheloha [Wed, 26 Sep 2018 17:23:13 +0000 (17:23 +0000)]
KERN_CPTIME2: set ENODEV if the CPU is offline.
This lets userspace distinguish between idle CPUs and those that are
not schedulable because hw.smt=0.
A subsequent commit probably needs to add documentation for this
to sysctl.2 (and perhaps elsewhere) after the dust settles.
Also included here are changes to systat(1) and top(1) that account
for the ENODEV case and adjust behavior accordingly:
- systat(1)'s cpu view prints placeholder marks ('-') instead of
percentages for each state if the given CPU is offline.
- systat(1)'s vmstat view checks for offline CPUs when computing the
machine state total and excludes them, so the CPU usage graph
only represents the states for online CPUs.
- top(1) does not draw CPU rows for offline CPUs when the view is
redrawn. If CPUs "go offline", percentages for each state are
replaced by placeholder marks ('-'); the view will need to be
redrawn to remove these rows. If CPUs "go online" the view will
need to be redrawn to show these new CPUs. In "combined CPU" mode,
the count and the state totals only represent online CPUs.
Ports using KERN_CPTIME2 will need to be updated. The changes
described above to make systat(1) and top(1) aware of the ENODEV
case *and* gracefully handle a changing HW_NCPUONLINE while the
application is running are not necessarily appropriate for each
and every port.
The changes described above are so extensive in part to demonstrate
one way a program *might* be made robust to changing CPU availability.
In particular, changing hw.smt after boot is an extremely rare event,
and this needs to be weighed when updating ports.
The logic needed to account for the KERN_CPTIME2 ENODEV case is
very roughly:
if (sysctl(...) == -1) {
if (errno != ENODEV) {
/* Actual error occurred. */
} else {
/* CPU is offline. */
}
} else {
/* CPU is online and CPU states were set by sysctl(2). */
}
Prompted by deraadt@. Basic idea for ENODEV from kettenis@. Discussed at
length with kettenis@. Additional testing by tb@.
No complaints from hackers@ after a week.
ok kettenis@, "I think you should commit [now]" deraadt@
kn [Wed, 26 Sep 2018 16:39:19 +0000 (16:39 +0000)]
Use more appropiate types/limits around strtonum()
Replace `long long id' with appropiate types and names, use smaller limits
where applicable and move variable declarations up out of loops.
This makes the code clearer and a tad simpler while staying consistent
across databases.
Feedback and OK millert
eric [Wed, 26 Sep 2018 16:28:34 +0000 (16:28 +0000)]
treat NOTIMP as NO_DATA in response to MX query: fallback to hostname lookup
instead of bouncing the mail.
ok gilles@