openbsd
6 years agoNuke unused state S_REBINDING. We just use the time
krw [Tue, 6 Feb 2018 21:09:10 +0000 (21:09 +0000)]
Nuke unused state S_REBINDING. We just use the time
to decide between unicast and broadcast for REQUEST.

6 years agoWhen binding a lease from the dhclient.leasees.<if> file and
krw [Tue, 6 Feb 2018 21:01:27 +0000 (21:01 +0000)]
When binding a lease from the dhclient.leasees.<if> file and
the renewal time is in the past wait retry_interval before
trying to renew the lease.

6 years agowhen we get SIGHUP, close conffd so it's reopened (and rewound).
tedu [Tue, 6 Feb 2018 20:38:47 +0000 (20:38 +0000)]
when we get SIGHUP, close conffd so it's reopened (and rewound).
problem and early fix by anton

6 years agoAllow the kernel to recognize that it has been netbooted and to add the
naddy [Tue, 6 Feb 2018 20:35:21 +0000 (20:35 +0000)]
Allow the kernel to recognize that it has been netbooted and to add the
boot interface to the "netboot" group.  efiboot grabs the MAC address
from the PXE environment, passes it to the kernel, where it is matched
against the list of ethernet interfaces and the boot device is set.
Concept and most of the code cribbed from amd64.
ok kettenis@

6 years agoPrint an explicit error if the backup volume is not present in
tb [Tue, 6 Feb 2018 19:57:37 +0000 (19:57 +0000)]
Print an explicit error if the backup volume is not present in
hw.disknames. This can only happen due to a failure or user error.
In either case, silent failure makes it hard to discover and debug.
Now it will be easy to spot in the daily mail.

ok rob, schwarze

6 years agoIf -n is given, the netstart script should not (try to) set the default
tb [Tue, 6 Feb 2018 19:53:50 +0000 (19:53 +0000)]
If -n is given, the netstart script should not (try to) set the default
route(s). Simply print the command(s) to be issued instead.

tweak & ok rpe

6 years agoavoid not working if redirected to another urlscheme
espie [Tue, 6 Feb 2018 16:34:35 +0000 (16:34 +0000)]
avoid not working if redirected to another urlscheme

6 years agosyslog cdns redirect, as suggested by sthen@
espie [Tue, 6 Feb 2018 16:29:01 +0000 (16:29 +0000)]
syslog cdns redirect, as suggested by sthen@

6 years agoDelete the "no blank before trailing delimiter" check from the
schwarze [Tue, 6 Feb 2018 16:28:26 +0000 (16:28 +0000)]
Delete the "no blank before trailing delimiter" check from the
partial explicit macros.  Leah Neukirchen <leah at vuxu dot org>
rightfully points out that the check makes no sense for these macros.

6 years agorefactor the "Signature" code for later
espie [Tue, 6 Feb 2018 15:17:26 +0000 (15:17 +0000)]
refactor the "Signature" code for later
- all stuff being elements end up as version elements
- store them directly in the hash, so that we can properly impose
behavior depending on VersionElement (adding stuff to LibObject/PackageName
was slightly icky)

6 years agoClarify that the "bind" built-in command only affects Emacs editing
schwarze [Tue, 6 Feb 2018 15:13:32 +0000 (15:13 +0000)]
Clarify that the "bind" built-in command only affects Emacs editing
mode, to avoid potential confusion pointed out by andreas dot kahari
at icm dot uu dot se on misc@.
Patch minimally tweaked based on a comment from jmc@.
OK anton@ jca@ jmc@ on the previous version without the tweak.

6 years agoThere was a race in the TCP timers. As they may sleep to grab the
bluhm [Tue, 6 Feb 2018 15:13:08 +0000 (15:13 +0000)]
There was a race in the TCP timers.  As they may sleep to grab the
netlock, timers may still run after they have been disarmed.  Deleting
the timeout is not sufficient to cancel them, but the code from 4.4
BSD is assuming this.
The solution is to add a flag for every timer to see whether it has
been armed or canceled.  Remove the TF_DEAD check as tcp_canceltimers()
is called before the reaper timer is fired.  Cancelation works
reliably now.
OK mpi@

6 years agoDo some cleanup in ah_massage_headers().
bluhm [Tue, 6 Feb 2018 14:54:22 +0000 (14:54 +0000)]
Do some cleanup in ah_massage_headers().
- Declare global array ipseczeroes containing zeroes constant.
- The proto parameter contains the address family, so call it af.
- Remove an unused if block, just keep the else.
- If m_copyback(M_NOWAIT) fails, return with error instead of working
  with an inconsistent mbuf.
- ip6_nxt is u_int8_t, no need to clear the high bits.
- The offset and next protocol are advanced for all extension
  headers, move it after the switch.
- ah_massage_headers() returns an errno, call the variable error.
OK procter@

6 years agoDo not call freeaddrinfo() with a NULL parameter.
bluhm [Tue, 6 Feb 2018 14:45:52 +0000 (14:45 +0000)]
Do not call freeaddrinfo() with a NULL parameter.
OK jsing@

6 years agomake sure that all error paths are correctly handled in asr_run_sync()
eric [Tue, 6 Feb 2018 13:00:48 +0000 (13:00 +0000)]
make sure that all error paths are correctly handled in asr_run_sync()
and that the result is always properly set when the functions returns.
fix issues spotted by claudio@.

ok claudio@

6 years agoMake sure sigfillsiz is word aligned.
patrick [Tue, 6 Feb 2018 09:25:54 +0000 (09:25 +0000)]
Make sure sigfillsiz is word aligned.

ok kettenis@

6 years agosome finger muscle workout:
henning [Tue, 6 Feb 2018 09:16:11 +0000 (09:16 +0000)]
some finger muscle workout:
bzero -> memset and (very few) bcopy -> memcpy/memmove

6 years agoremove extern from function prototypes, remove some variable names, and a
phessler [Tue, 6 Feb 2018 09:04:45 +0000 (09:04 +0000)]
remove extern from function prototypes, remove some variable names, and a
left-over kernel malloc feature we don't use.

OK deraadt@

6 years agoRun newvers.sh with umask 007 to work around permission issues that
tb [Tue, 6 Feb 2018 08:42:33 +0000 (08:42 +0000)]
Run newvers.sh with umask 007 to work around permission issues that
cause 'make release' fail the first time around after building GENERIC
if /usr/obj/ wasn't cleaned out properly. The proper fix would be to
implement privdrop for kernel builds but this is trickier than it looks
at first sight.

discussed with deraadt

6 years agoReplace "trojan horse" with the correct term (MITM). From maikel at
dtucker [Tue, 6 Feb 2018 06:01:54 +0000 (06:01 +0000)]
Replace "trojan horse" with the correct term (MITM).  From maikel at
predikkta.com via bz#2822, ok markus@

6 years agoFix fprintf() to include "\n" where needed. Prefix "no lease"
krw [Tue, 6 Feb 2018 05:09:51 +0000 (05:09 +0000)]
Fix fprintf() to include "\n" where needed. Prefix "no lease"
messages with interface name.

Spotted by & ok tb@

6 years agomove malloc check up so that it actually works.
florian [Tue, 6 Feb 2018 05:08:27 +0000 (05:08 +0000)]
move malloc check up so that it actually works.
OK benno

6 years agokill dead code
florian [Tue, 6 Feb 2018 04:19:56 +0000 (04:19 +0000)]
kill dead code

6 years agooutput the data part of LCP Echo-Request and Echo-Reply packets.
dlg [Tue, 6 Feb 2018 03:41:58 +0000 (03:41 +0000)]
output the data part of LCP Echo-Request and Echo-Reply packets.

6 years agorework ppp, pptp, and gre parsing.
dlg [Tue, 6 Feb 2018 03:07:51 +0000 (03:07 +0000)]
rework ppp, pptp, and gre parsing.

this started cos i was looking at pptp, which came out like this:

23:52:00.197893  call 24 seq 7: gre-ppp-payload (gre encap)
23:52:00.198930  call 1 seq 7 ack 7: gre-ppp-payload (gre encap)

now it looks like this:

23:52:00.197893 20.0.0.2 > 20.0.0.1: pptp callid 24 seq 7: 17.1.1.122 > 40.0.0.2: icmp: echo request
23:52:00.198930 20.0.0.1 > 20.0.0.2: pptp callid 1 seq 7 ack 7: 40.0.0.2 > 17.1.1.122: icmp: echo reply

the big improvement in ppp parsing is it stops parsing based on
what the ppp headers say, rather than what bytes have been captured.
this also adds parsing of EAP packets.

DLT_PPP_SERIAL is now recognised and printed. gre now prints the
outer addresses always, not just when it's encapsulated by ipv6 or
-v is passed to tcpdump.

ok sthen@

6 years agorecognise DLT_PPP_SERIAL.
dlg [Tue, 6 Feb 2018 02:55:48 +0000 (02:55 +0000)]
recognise DLT_PPP_SERIAL.

shlib version doesnt need a bump before no new symbols were added
or removed.

part of a larger diff that was ok sthen@

6 years agoRemove manual shutdown and close of the socket since in this case
tb [Tue, 6 Feb 2018 02:40:29 +0000 (02:40 +0000)]
Remove manual shutdown and close of the socket since in this case
SSL_free will do this a second time.

ok jsing

6 years agoRespect the OPENSSL make variable everywhere so that
tb [Tue, 6 Feb 2018 02:31:13 +0000 (02:31 +0000)]
Respect the OPENSSL make variable everywhere so that

make OPENSSL=/usr/src/usr.bin/openssl/obj/openssl

actually does the expected thing instead of running a mixture of both the
openssl below /usr/obj and the one below /usr/bin.  Found the hard way via
backtraces that made no sense whatsoever.

ok jsing

6 years agoAdd support for chips which use SYSMEM memory. Code is a simplified
patrick [Tue, 6 Feb 2018 02:23:04 +0000 (02:23 +0000)]
Add support for chips which use SYSMEM memory.  Code is a simplified
version of the SOCRAM one.

6 years agoSupport setting the Cortex-M3 cores to active mode.
patrick [Tue, 6 Feb 2018 02:12:55 +0000 (02:12 +0000)]
Support setting the Cortex-M3 cores to active mode.

6 years agoreduce scope of variable a bit to avoid shadowing
tedu [Tue, 6 Feb 2018 01:24:31 +0000 (01:24 +0000)]
reduce scope of variable a bit to avoid shadowing

6 years agoLoad the Intel microcode much earlier. So far we had loaded it after
patrick [Tue, 6 Feb 2018 01:09:17 +0000 (01:09 +0000)]
Load the Intel microcode much earlier.  So far we had loaded it after
the CPUs identified and then we had to update the CPU flags afterwards.
As microcode updates can add/remove instructions and features, we need
to load it earlier.  Thus, make the bootloader look for the microcode
and supply it to the kernel as another bootarg.  This way we can update
the cores' microcode before we identify them.

ok deraadt@

6 years agoFlip -q (be quiet) into -v (be noisy), making terseness the default
krw [Tue, 6 Feb 2018 00:25:09 +0000 (00:25 +0000)]
Flip -q (be quiet) into -v (be noisy), making terseness the default
behaviour.

Always go daemon after link_timeout seconds and complete lease
negotiations in the background if necessary. No hanging around in the
foreground for the full 64 seconds waiting for a server to appear.

Log a more relevant message when a default route can't be obtained via
RTM_GET. i.e. "no default route" rather than "No such process".

-q -> -v ok mpi@

6 years agoremove a bit of dead code. ok bluhm deraadt
tedu [Tue, 6 Feb 2018 00:18:38 +0000 (00:18 +0000)]
remove a bit of dead code. ok bluhm deraadt

6 years agochdir to the target directory, run make there and fchdir back after.
henning [Tue, 6 Feb 2018 00:05:24 +0000 (00:05 +0000)]
chdir to the target directory, run make there and fchdir back after.
allows Makefiles with ${.CURDIR} constructs to work with crunchgen.
pointed out by Holger Mikolon, input from theo, ok theo millert

6 years agoSwitch a few lists to tailqs. Mainly the prefix list per aspath needs
claudio [Mon, 5 Feb 2018 23:29:59 +0000 (23:29 +0000)]
Switch a few lists to tailqs. Mainly the prefix list per aspath needs
to be a queue so that we can use it in the Adj-RIB-Out case.
OK benno@

6 years agoIf an http proxy was used when fetching sets in the ramdisk, write it to
sthen [Mon, 5 Feb 2018 22:31:40 +0000 (22:31 +0000)]
If an http proxy was used when fetching sets in the ramdisk, write it to
rc.firsttime for fw_update and syspatch. From trondd at kagu-tsuchi com,
ok halex@

6 years agotypos
anton [Mon, 5 Feb 2018 18:30:29 +0000 (18:30 +0000)]
typos

6 years agoPass env(1) to ${SUDO}, not the other way around. Solves an issue when running
anton [Mon, 5 Feb 2018 18:28:15 +0000 (18:28 +0000)]
Pass env(1) to ${SUDO}, not the other way around. Solves an issue when running
the tests as a non-root and doas is not configured to preserve the OBJDIR
variable. While here, ensure OBJDIR is defined and fix typos.

ok bluhm@

6 years agoDocument athn(4) USB open source firmware support.
stsp [Mon, 5 Feb 2018 15:32:10 +0000 (15:32 +0000)]
Document athn(4) USB open source firmware support.
Remove the BUGS section, USB Host AP works now. Mention in the CAVEATS
section that USB Host AP is limited to 7 concurrent clients.
Add bentley@ and myself to the AUTHORS section.
ok jmc, bentley

6 years agoRemove tcp_acounts, some tcp_usrreq() counting from 1981. Also
bluhm [Mon, 5 Feb 2018 14:53:26 +0000 (14:53 +0000)]
Remove tcp_acounts, some tcp_usrreq() counting from 1981.  Also
remove the #ifdef KPROF which seems to be unused since that year.
OK mpi@

6 years agosimplify macros, and avoid some arg splitting;
jmc [Mon, 5 Feb 2018 12:43:29 +0000 (12:43 +0000)]
simplify macros, and avoid some arg splitting;

6 years agoIntroduce "depend on". This allows ospfd to set the metric dependent
remi [Mon, 5 Feb 2018 12:11:28 +0000 (12:11 +0000)]
Introduce "depend on". This allows ospfd to set the metric dependent
on the status of another interface.

in collaboration with benno@ jca@
OK benno@ jca@

6 years agoMove event packet handling into a serialized process context to remove
patrick [Mon, 5 Feb 2018 10:30:04 +0000 (10:30 +0000)]
Move event packet handling into a serialized process context to remove
a state transitioning race condition.  Event packets, like completing
authentication and the following association completion, are usually
received shortly after another.  The code that handles those events is
scheduled using a task, so it can easily happen that the state change
caused by the authentication packet was not done before the following
association event arrived.  By moving the event packet handling into the
same context as the state task we serialize the processing and remove
the race condition.  Fixes connecting to the 5GHz WiFi AP used at a2k18.

ok stsp@

6 years agoclaim copyright
stsp [Mon, 5 Feb 2018 09:52:03 +0000 (09:52 +0000)]
claim copyright

6 years agoEnsure that the "bound to ..." message appears in the log unless
krw [Mon, 5 Feb 2018 09:33:50 +0000 (09:33 +0000)]
Ensure that the "bound to ..." message appears in the log unless
dhclient was started with '-d'. Move the "yielding responsibility"
message to log_debug().  Stop logging duplicate "bound to ..."
messages now that one is guaranteed to be present when the address is
first bound. Thins out logs. Especially if you run with '-q'.

6 years agoMove athn(4) USB devices to the open source atk9k HTC firmware.
stsp [Mon, 5 Feb 2018 08:48:57 +0000 (08:48 +0000)]
Move athn(4) USB devices to the open source atk9k HTC firmware.

Also fix support for AR7010 devices, fix mode hostap by properly
managing the firmware station table, and fix Tx rate reporting.

Tested on AR7010 and AR9271 devices.

ok kevlo@

6 years agoAdd a new function hook to struct ieee80211com which wireless drivers
stsp [Mon, 5 Feb 2018 08:44:13 +0000 (08:44 +0000)]
Add a new function hook to struct ieee80211com which wireless drivers
can use to process, and then acknowledge or reject, incoming AUTH
requests in hostap mode.

net80211 accepts an AUTH request from any STA which fits into the node
cache. This behaviour doesn't work for devices which have a lower limit
on concurrent STAs they can serve, so such drivers need an override.

This will be used by our athn(4) USB driver soon.

ok kevlo@

6 years agoAdd struct status_line to hold status line members of struct client, not
nicm [Mon, 5 Feb 2018 08:21:54 +0000 (08:21 +0000)]
Add struct status_line to hold status line members of struct client, not
used yet but will be soon. From Thomas Adam.

6 years agotweak previous;
jmc [Mon, 5 Feb 2018 07:16:13 +0000 (07:16 +0000)]
tweak previous;

6 years agoShow if filter is active/no matches in modes.
nicm [Mon, 5 Feb 2018 06:51:41 +0000 (06:51 +0000)]
Show if filter is active/no matches in modes.

6 years agoAdd a couple of non-negativity checks to avoid close(-1).
tb [Mon, 5 Feb 2018 05:37:46 +0000 (05:37 +0000)]
Add a couple of non-negativity checks to avoid close(-1).

ok djm

6 years agoThe file descriptors for socket, stdin, stdout and stderr aren't
tb [Mon, 5 Feb 2018 05:36:49 +0000 (05:36 +0000)]
The file descriptors for socket, stdin, stdout and stderr aren't
necessarily distinct, so check if they are the same to avoid closing
the same fd several times.

ok djm

6 years agoAlways run through state_preboot() when starting up or the
krw [Mon, 5 Feb 2018 05:08:27 +0000 (05:08 +0000)]
Always run through state_preboot() when starting up or the
link status changes. Simplifies some logic.

6 years agobcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio
henning [Mon, 5 Feb 2018 05:06:51 +0000 (05:06 +0000)]
bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio

6 years agoremove unused function prototype
mlarkin [Mon, 5 Feb 2018 05:01:08 +0000 (05:01 +0000)]
remove unused function prototype

6 years agoI accidentially a word
djm [Mon, 5 Feb 2018 04:02:53 +0000 (04:02 +0000)]
I accidentially a word

6 years agoConstants which can go into .rodata
deraadt [Mon, 5 Feb 2018 04:01:49 +0000 (04:01 +0000)]
Constants which can go into .rodata

6 years agoNuke unused parameter to go_daemon().
krw [Mon, 5 Feb 2018 03:59:49 +0000 (03:59 +0000)]
Nuke unused parameter to go_daemon().

6 years agoChange struct prefix a bit. Make the aspath pointer opaque and remove the
claudio [Mon, 5 Feb 2018 03:55:54 +0000 (03:55 +0000)]
Change struct prefix a bit. Make the aspath pointer opaque and remove the
direct pointer to the pt_prefix struct. To getter functions prefix_aspath()
and prefix_peer() added to make access of the opaque pointers possible.
Looks good henning@ and benno@

6 years agoPass a FILE * instead of a file descriptor into load_user() and
millert [Mon, 5 Feb 2018 03:52:37 +0000 (03:52 +0000)]
Pass a FILE * instead of a file descriptor into load_user() and
perform the fclose() in process_crontab().  Previously we were
closing the crontab fd twice--once in load_user() via fclose() and
once in process_crontab().  OK tb@

6 years agoimplement an arp filter
henning [Mon, 5 Feb 2018 03:51:53 +0000 (03:51 +0000)]
implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno

6 years agosync
deraadt [Mon, 5 Feb 2018 03:35:09 +0000 (03:35 +0000)]
sync

6 years agoCKSUM_DIGEST_STRING_LENGTH bounding didn't include full range of size_t
deraadt [Mon, 5 Feb 2018 03:16:10 +0000 (03:16 +0000)]
CKSUM_DIGEST_STRING_LENGTH bounding didn't include full range of size_t
and NUL
ok millert krw tb

6 years agoDo not bother NULLing pointers in memory that is freed immediately after.
jsing [Mon, 5 Feb 2018 01:47:03 +0000 (01:47 +0000)]
Do not bother NULLing pointers in memory that is freed immediately after.

6 years agoAdd a comment why it is OK to set the tableid to 0 for Adj-RIB-In/Out.
claudio [Mon, 5 Feb 2018 01:42:40 +0000 (01:42 +0000)]
Add a comment why it is OK to set the tableid to 0 for Adj-RIB-In/Out.
Requested by henning@

6 years agoprefix check must be last because the prefixlen check does an immediate return.
claudio [Mon, 5 Feb 2018 01:36:45 +0000 (01:36 +0000)]
prefix check must be last because the prefixlen check does an immediate return.
This will be rewritten soon so just do the quick fix now.
Found and OK benno@

6 years agoBe consistent with the goto label names used in libtls code.
jsing [Mon, 5 Feb 2018 00:52:24 +0000 (00:52 +0000)]
Be consistent with the goto label names used in libtls code.

No change to generated assembly.

6 years agouse sizeof, rather than the constant. on change in binary.
deraadt [Sun, 4 Feb 2018 22:09:33 +0000 (22:09 +0000)]
use sizeof, rather than the constant.  on change in binary.

6 years agorepair ugly indents
deraadt [Sun, 4 Feb 2018 21:53:54 +0000 (21:53 +0000)]
repair ugly indents

6 years agoDon't assume that we use LLVM's ld(1) if we use clang(1) as main system
patrick [Sun, 4 Feb 2018 21:11:32 +0000 (21:11 +0000)]
Don't assume that we use LLVM's ld(1) if we use clang(1) as main system
compiler.  Only handle this case when LLD was actually installed during
the cross-compiler setup.  Unbreaks armv7 after switching to clang since
it uses binutils' ld(1).

6 years agoExpand Type strings by one space, to fit ld.so, in the same ugly way "exe "
deraadt [Sun, 4 Feb 2018 20:41:58 +0000 (20:41 +0000)]
Expand Type strings by one space, to fit ld.so, in the same ugly way "exe "
was being handled.

6 years agoDocument the compat-mode settings.
bru [Sun, 4 Feb 2018 20:29:59 +0000 (20:29 +0000)]
Document the compat-mode settings.

Thanks to Ingo for his help.

ok schwarze@

6 years agoUpstream ncurses has introduced terminfo capabilities to specify RGB
nicm [Sun, 4 Feb 2018 10:10:39 +0000 (10:10 +0000)]
Upstream ncurses has introduced terminfo capabilities to specify RGB
colour ("true" or "direct" colour). These consist of new entries (such
as "xterm-direct") which have a different setaf/setab implementation,
colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag.

The setaf/setab definitions seem to be geared towards what ncurses (or
emacs maybe) needs, in that the new versions do only ANSI and RGB
colours (they can't be used for the 256 colour palette); they rely on
the silly ISO colon-separated version of SGR; and they use a weird
multiplication scheme so they still only need one argument. The higher
values of colors and pairs require a recent ncurses to parse.

tmux can use the RGB flag to detect RGB colour support (keeping the old
Tc extension for backwards compatibility for now). However, as we still
want to send 256 colour information unchanged when possible, the new
setaf/setab are awkward. So when RGB is present, reserve setaf/setab
only for ANSI colours and use the escape sequences directly for 256 and
RGB colours. (To my knowledge no recent terminal uses unusual escape
sequences for these in any case.)

6 years agoDocument 802.11ac media types and fix docs for the 11n ones while here.
stsp [Sun, 4 Feb 2018 10:09:02 +0000 (10:09 +0000)]
Document 802.11ac media types and fix docs for the 11n ones while here.
suggested by and ok jmc@

6 years agoAdd media types for 802.11 AC.
stsp [Sun, 4 Feb 2018 10:06:51 +0000 (10:06 +0000)]
Add media types for 802.11 AC.
The first driver to make use of these will probably be bwfm(4).
typos spotted by and ok phessler kettenis

6 years agoClenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In and
claudio [Sun, 4 Feb 2018 05:08:16 +0000 (05:08 +0000)]
Clenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In and
Adj-RIB-Out and use them consistently. Makes code easier to read.
OK benno@

6 years agofprintf(stderr -> warnx
cheloha [Sun, 4 Feb 2018 04:28:41 +0000 (04:28 +0000)]
fprintf(stderr -> warnx

ok jca@ tb@

6 years agoPrint strtonum(3)-style error messages on invalid numeric input.
cheloha [Sun, 4 Feb 2018 02:18:15 +0000 (02:18 +0000)]
Print strtonum(3)-style error messages on invalid numeric input.

More informative than the usage message.

While here, no need to return EINVAL: just return 1 if we overflow.

ok jca@ schwarze@

6 years agoRemove a pointless assignment introduced in previous commit.
stsp [Sat, 3 Feb 2018 17:17:31 +0000 (17:17 +0000)]
Remove a pointless assignment introduced in previous commit.
CID 1464695; pointed out to me by mikeb@

6 years agoSince tcp_attach() has moved to a separate protocol function, the
bluhm [Sat, 3 Feb 2018 16:14:26 +0000 (16:14 +0000)]
Since tcp_attach() has moved to a separate protocol function, the
inp cannot be NULL.  Remove the useless if in tcp_usrreq().
OK mpi@

6 years agoThe recover script should have the same sanity checks as recover.c.
millert [Sat, 3 Feb 2018 15:44:36 +0000 (15:44 +0000)]
The recover script should have the same sanity checks as recover.c.
Specifically, open files with O_NONBLOCK and enforce a mode of 0600.

6 years agoSimple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
mpi [Sat, 3 Feb 2018 13:39:48 +0000 (13:39 +0000)]
Simple USBPcap parser for tcpdump(8).  Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@

6 years agoAdd support for dumping USB transfers via bpf(4) using USBPcap headers.
mpi [Sat, 3 Feb 2018 13:37:37 +0000 (13:37 +0000)]
Add support for dumping USB transfers via bpf(4) using USBPcap headers.

ok deraadt@, dlg@

6 years agoTests were incorrect.
mpi [Sat, 3 Feb 2018 13:09:32 +0000 (13:09 +0000)]
Tests were incorrect.

6 years agoregen
florian [Sat, 3 Feb 2018 11:04:01 +0000 (11:04 +0000)]
regen

6 years agoUpdate nsd to 4.1.19.
florian [Sat, 3 Feb 2018 11:03:51 +0000 (11:03 +0000)]
Update nsd to 4.1.19.

OK sthen@, "so far so good" millert@

Obligatory commit from 33,000 ft.

6 years agoIn ether_input() use goto dropanyway instead of repeating m_freem()
bluhm [Fri, 2 Feb 2018 22:00:39 +0000 (22:00 +0000)]
In ether_input() use goto dropanyway instead of repeating m_freem()
and return.  Change sizeof(etherbroadcastaddr) to ETHER_ADDR_LEN
for consistency.
from Michele Curti

6 years agoExtend range for seconds from 100 million to upper bound of time_t.
cheloha [Fri, 2 Feb 2018 16:46:37 +0000 (16:46 +0000)]
Extend range for seconds from 100 million to upper bound of time_t.

Makes us compliant with POSIX.1-2008, which requires that sleep(1) support
up to 2147483647 seconds.

Bounced off of tb@ and jca@.

ok tb@ millert@ jca@

6 years agoFix 'show ip bgp detail as' error.
job [Fri, 2 Feb 2018 13:46:17 +0000 (13:46 +0000)]
Fix 'show ip bgp detail as' error.

Thanks Pierre Emeriaud <petrus.lt+openbsd@gmail.com>!

6 years agoMake 'ifconfig if0 wpaakms 802.1x' implicitly enable WPA.
stsp [Fri, 2 Feb 2018 13:39:52 +0000 (13:39 +0000)]
Make 'ifconfig if0 wpaakms 802.1x' implicitly enable WPA.
Requring WPA to be enabled separately via 'ifconfig if0 wpa' was confusing.
ok mlarkin phessler mpi

6 years agouse the same bar used to determine memory type when mapping memory
jsg [Fri, 2 Feb 2018 11:24:37 +0000 (11:24 +0000)]
use the same bar used to determine memory type when mapping memory
should resolve mapping error on SAS3508 encountered by claudio@
ok jmatthew@

6 years agoconvert the remaining examples to full sentences;
jmc [Fri, 2 Feb 2018 10:53:44 +0000 (10:53 +0000)]
convert the remaining examples to full sentences;

6 years agotweak grammar in RETURN VALUES;
jmc [Fri, 2 Feb 2018 10:52:44 +0000 (10:52 +0000)]
tweak grammar in RETURN VALUES;

6 years agoEnable interrupts in (synchronous) trap handlers.
kettenis [Fri, 2 Feb 2018 09:33:35 +0000 (09:33 +0000)]
Enable interrupts in (synchronous) trap handlers.

ok patrick@

6 years agoEnable interrupts while running interrupt handlers like we do on agintc(4).
kettenis [Fri, 2 Feb 2018 09:32:11 +0000 (09:32 +0000)]
Enable interrupts while running interrupt handlers like we do on agintc(4).
Spotted by patrick@

ok patrick@

6 years agovmm: add support for send / receive for AMD SVM hosts
pd [Fri, 2 Feb 2018 08:24:28 +0000 (08:24 +0000)]
vmm: add support for send / receive for AMD SVM hosts

ok mlarkin@

6 years agoRemove . from $PATH since it seems there is no strong reason to keep
yasuoka [Fri, 2 Feb 2018 02:29:54 +0000 (02:29 +0000)]
Remove . from $PATH since it seems there is no strong reason to keep
it and many people prefer to remove it.  Pointed out by m-asou at
soum.co.jp.

ok millert espie bluhm

6 years agoDone means to stop processing the protocol loop, but IP proto none
bluhm [Thu, 1 Feb 2018 21:18:12 +0000 (21:18 +0000)]
Done means to stop processing the protocol loop, but IP proto none
is protocol 58.  Fix typo in ip6_etherip_input() to properly discard
EtherIP tunnel IPv6 packets if the feature is disabled.
found by Maxime Villard; with markus@; OK patrick@ deraadt@ millert@ jca@

6 years agoThe function ip6_get_prevhdr() did return a pointer into a mbuf.
bluhm [Thu, 1 Feb 2018 21:11:33 +0000 (21:11 +0000)]
The function ip6_get_prevhdr() did return a pointer into a mbuf.
It was not guaranteed that the mbuf data was not somewhere else in
the chain.  So return an offset and do a proper mbuf pulldown.
found by Maxime Villard; from NetBSD; with markus@; OK deraadt@