openbsd
6 years agoUse prefix_nexthop() to access the nexthop instead of dereferencing the
claudio [Tue, 24 Jul 2018 10:10:58 +0000 (10:10 +0000)]
Use prefix_nexthop() to access the nexthop instead of dereferencing the
field in asp directly. This is a step to move the prefix from rde_aspath
to struct prefix.
OK benno@

6 years agoMove duplicate code into new helper print_addr_str()
kn [Tue, 24 Jul 2018 09:48:04 +0000 (09:48 +0000)]
Move duplicate code into new helper print_addr_str()

This simply puts the wiggle around inet_ntop() from four into one location.

OK benno

6 years agoSimplify getaddrinfo() error handling
kn [Tue, 24 Jul 2018 09:38:21 +0000 (09:38 +0000)]
Simplify getaddrinfo() error handling

`error' is not used so drop it and jump to the end.

OK sashan

6 years agoFix address calculation for _DYNAMIC. We want to address of _DYNAMIC itself,
kettenis [Tue, 24 Jul 2018 09:27:44 +0000 (09:27 +0000)]
Fix address calculation for _DYNAMIC.  We want to address of _DYNAMIC itself,
not the address of its GOT entry.  The current code mixed the high bits of
the GOT entry address with the low bits of the true address.  This only
worked by accident for small binaries where _DYNAMIC and its GOT entry
happen to reside on the same page.

ok guenther@, mortimer@

6 years agoWhen a GRE packet goes to "decline", the mbuf pointer was not updated
yasuoka [Tue, 24 Jul 2018 07:40:35 +0000 (07:40 +0000)]
When a GRE packet goes to "decline", the mbuf pointer was not updated
properly.  This had caused an panic when the mbuf pointer is updated.
Found by IIJ.

ok dlg

6 years agoAlso do RSB refilling when context switching, after vmexits, and
guenther [Tue, 24 Jul 2018 02:42:25 +0000 (02:42 +0000)]
Also do RSB refilling when context switching, after vmexits, and
when vmlaunch or vmresume fails.

Follow the lead of clang and the intel recommendation and do an lfence
after the pause in the speculation-stop path for retpoline, RSB refill,
and meltover ASM bits.

ok kettenis@ deraadt@

6 years agoUse the same order in NAME, SYNOPSIS, DESCRIPTION, and RETURN VALUES to
tb [Tue, 24 Jul 2018 02:01:34 +0000 (02:01 +0000)]
Use the same order in NAME, SYNOPSIS, DESCRIPTION, and RETURN VALUES to
improve readability and ease of maintenance.

Positive feedback jmc
Detailed suggestion & ok schwarze

6 years agoRemove defunct prototype leftover from previous code cleanup.
rob [Tue, 24 Jul 2018 01:31:20 +0000 (01:31 +0000)]
Remove defunct prototype leftover from previous code cleanup.

ok tb@, claudio@

6 years agoAdd "Mitigation G-2" per AMD's Whitepaper "Software Techniques for
brynet [Mon, 23 Jul 2018 23:25:02 +0000 (23:25 +0000)]
Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques for
Managing Speculation on AMD Processors"

By setting MSR C001_1029[1]=1, LFENCE becomes a dispatch serializing
instruction.

Tested on AMD FX-4100 "Bulldozer", and Linux guest in SVM vmd(8)

ok deraadt@ mlarkin@

6 years agoDon't cast malloc(3) size to u_int.
cheloha [Mon, 23 Jul 2018 23:09:37 +0000 (23:09 +0000)]
Don't cast malloc(3) size to u_int.

Large buffer sizes on 64-bit platforms cause the sum to wrap, leading
read(2) to fail later.

We check prior to this point that all buffer sizes are <= SSIZE_MAX.
SSIZE_MAX * 2 < SIZE_MAX on all platforms, so the addition here will
not overflow and cause a similar issue.

Discovered by tobias@ a while back.

ok deraadt millert tobias

6 years agoRemove more redundant element selectors where the class selector
schwarze [Mon, 23 Jul 2018 22:51:24 +0000 (22:51 +0000)]
Remove more redundant element selectors where the class selector
is already sufficient.  John Gardner tells me that "CSS selectors
should only contain what's necessary to target their subjects".

6 years agoreplace the last instances of ex units by em;
schwarze [Mon, 23 Jul 2018 22:33:54 +0000 (22:33 +0000)]
replace the last instances of ex units by em;
recommended by John Gardner <gardnerjohng at gmail dot com>

6 years agoCoverity CID 1470233 complainst that the m != NULL check in
bluhm [Mon, 23 Jul 2018 21:14:00 +0000 (21:14 +0000)]
Coverity CID 1470233 complainst that the m != NULL check in
syn_cache_get() is not neccessary.  Also make the abort label
consistent to resetandabort and free the mbuf there.
OK mpi@

6 years agooops, failed to notice that SEE ALSO got messed up;
jmc [Mon, 23 Jul 2018 19:53:55 +0000 (19:53 +0000)]
oops, failed to notice that SEE ALSO got messed up;

6 years agoAdd missing $OpenBSD$ CVS tag.
rob [Mon, 23 Jul 2018 19:51:39 +0000 (19:51 +0000)]
Add missing $OpenBSD$ CVS tag.

6 years agoThe imxiomuxc(4) node itself can also contain a set of pins to
patrick [Mon, 23 Jul 2018 19:13:54 +0000 (19:13 +0000)]
The imxiomuxc(4) node itself can also contain a set of pins to
configure.  These are pins that should be configured to a sane
state and are not necessarily referenced by another node.

ok kettenis@

6 years agoPoint to glob in section 7 for the actual list of special characters instead
kn [Mon, 23 Jul 2018 19:02:49 +0000 (19:02 +0000)]
Point to glob in section 7 for the actual list of special characters instead
the C API in section 3.

OK millert jmc nicm, "the right idea" deraadt

6 years agoDocument tls_peer_ocsp_result() and use it in place of the non-existent
tb [Mon, 23 Jul 2018 18:30:29 +0000 (18:30 +0000)]
Document tls_peer_ocsp_result() and use it in place of the non-existent
tls_peer_ocsp_result_msg() in the documentation.

input & ok jsing
Reads fine to jmc and makes sense to schwarze

6 years agoUse BN_swap_ct() instead of BN_consttime_swap() in
tb [Mon, 23 Jul 2018 18:24:22 +0000 (18:24 +0000)]
Use BN_swap_ct() instead of BN_consttime_swap() in
ec_GF2m_montgomery_point_multiply().  The new BN_swap_ct() API is an
improved version of the public BN_consttime_swap() function: it allows
error checking, doesn't assert(), and has fewer assumptions on the input.
This diff eliminates the last use of BN_consttime_swap() in our tree.

ok inoguchi, jsing

6 years agoUse a size_t instead of an int for the byte count in BN_swap_ct().
tb [Mon, 23 Jul 2018 18:14:32 +0000 (18:14 +0000)]
Use a size_t instead of an int for the byte count in BN_swap_ct().
Since bignums use ints for the same purpose, this still uses an int
internally after an overflow check.

Suggested by and discussed with jsing.
ok inoguchi, jsing

6 years agoClean up our disgusting implementations of BN_{,u}{add,sub}(), following
tb [Mon, 23 Jul 2018 18:07:21 +0000 (18:07 +0000)]
Clean up our disgusting implementations of BN_{,u}{add,sub}(), following
changes made in OpenSSL by Davide Galassi and others, so that one can
actually follow what is going on. There is no performance impact from
this change as the code still does essentially the same thing. There's
a ton of work still to be done to make the BN code less terrible.

ok jsing, kn

6 years agoDo "Return stack refilling", based on the "Return stack underflow" discussion
guenther [Mon, 23 Jul 2018 17:54:04 +0000 (17:54 +0000)]
Do "Return stack refilling", based on the "Return stack underflow" discussion
and its associated appendix at https://support.google.com/faqs/answer/7625886
This should address at least some cases of "SpectreRSB" and earlier
Spectre variants; more commits to follow.

The refilling is done in the enter-kernel-from-userspace and
return-to-userspace-from-kernel paths, making sure to do it before
unblocking interrupts so that a successive interrupt can't get the
CPU to C code without doing this refill.  Per the link above, it
also does it immediately after mwait, apparently in case the low-power
CPU states of idle-via-mwait flush the RSB.

ok mlarkin@ deraadt@

6 years agoImplement RSASSA-PKCS1-v1_5 as specified in RFC 8017.
tb [Mon, 23 Jul 2018 17:37:17 +0000 (17:37 +0000)]
Implement RSASSA-PKCS1-v1_5 as specified in RFC 8017.
Based on an OpenSSL commit by David Benjamin.

Alex Gaynor and Paul Kehrer from the pyca/cryptography Python library
reported that more than 200 "expected to fail" signatures among Project
Wycheproof's test vectors validated on LibreSSL. This patch makes them
all fail.

ok jsing

commit 608a026494c1e7a14f6d6cfcc5e4994fe2728836
Author: David Benjamin <davidben@google.com>
Date:   Sat Aug 20 13:35:17 2016 -0400

    Implement RSASSA-PKCS1-v1_5 as specified.

    RFC 3447, section 8.2.2, steps 3 and 4 states that verifiers must encode
    the DigestInfo struct and then compare the result against the public key
    operation result. This implies that one and only one encoding is legal.

    OpenSSL instead parses with crypto/asn1, then checks that the encoding
    round-trips, and allows some variations for the parameter. Sufficient
    laxness in this area can allow signature forgeries, as described in
    https://www.imperialviolet.org/2014/09/26/pkcs1.html

    Although there aren't known attacks against OpenSSL's current scheme,
    this change makes OpenSSL implement the algorithm as specified. This
    avoids the uncertainty and, more importantly, helps grow a healthy
    ecosystem. Laxness beyond the spec, particularly in implementations
    which enjoy wide use, risks harm to the ecosystem for all. A signature
    producer which only tests against OpenSSL may not notice bugs and
    accidentally become widely deployed. Thus implementations have a
    responsibility to honor the specification as tightly as is practical.

    In some cases, the damage is permanent and the spec deviation and
    security risk becomes a tax all implementors must forever pay, but not
    here. Both BoringSSL and Go successfully implemented and deployed
    RSASSA-PKCS1-v1_5 as specified since their respective beginnings, so
    this change should be compatible enough to pin down in future OpenSSL
    releases.

    See also https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00

    As a bonus, by not having to deal with sign/verify differences, this
    version is also somewhat clearer. It also more consistently enforces
    digest lengths in the verify_recover codepath. The NID_md5_sha1 codepath
    wasn't quite doing this right.

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
    GH: #1474

6 years agoWhen moving between networks slaacd configures new addresses but
florian [Mon, 23 Jul 2018 17:25:52 +0000 (17:25 +0000)]
When moving between networks slaacd configures new addresses but
leaves old ones behind. The IPv6 RFCs don't seem to offer guidance on
what to do in this case. (RFC 5220 discusses related issues, but not
exactly this.)

It seems a bit harsh to just delete old addresses - a naive
implementation can easily lead to flip-flopping between two prefixes.

Instead set the preferred lifetime to 0 for all addresses on an
interface when the link goes down, thus marking addresses as
deprecated but still usable. When the link comes back send a router
solicitation. If we are still on the old network and receive a router
advertisement the preferred lifetime will increase and the addresses
will no longer be deprecated.

If we moved to a new network we will get new router advertisements and
form new addresses. The old ones will stay deprecated and the address
selection algorithm will prefer new addresses.

Problem reported by many.

testing & OK phessler

6 years agoavoid using argv[0] for printing to stderr
tb [Mon, 23 Jul 2018 17:15:21 +0000 (17:15 +0000)]
avoid using argv[0] for printing to stderr

6 years agoadd _rad user
florian [Mon, 23 Jul 2018 14:15:14 +0000 (14:15 +0000)]
add _rad user
OK tb, claudio

6 years agoRemove rtadvd(8) rc script.
florian [Mon, 23 Jul 2018 12:05:50 +0000 (12:05 +0000)]
Remove rtadvd(8) rc script.

6 years agoRemove rtadvd(8), it's time to switch to rad(8).
florian [Mon, 23 Jul 2018 12:04:46 +0000 (12:04 +0000)]
Remove rtadvd(8), it's time to switch to rad(8).

6 years agosync
florian [Mon, 23 Jul 2018 11:57:56 +0000 (11:57 +0000)]
sync

6 years agoRemove rtadvd(8) leftovers in etc.
florian [Mon, 23 Jul 2018 11:57:17 +0000 (11:57 +0000)]
Remove rtadvd(8) leftovers in etc.
OK deraadt, phessler

6 years agoIt's time to switch to rad(8); tested by many.
florian [Mon, 23 Jul 2018 11:56:02 +0000 (11:56 +0000)]
It's time to switch to rad(8); tested by many.
Unhook rtadvd from build.
OK deraadt, phessler

6 years agoIt's time to switch to rad(8); tested by many.
florian [Mon, 23 Jul 2018 11:54:49 +0000 (11:54 +0000)]
It's time to switch to rad(8); tested by many.
Remove rtadvd(8) from rc(8).
OK deraadt, phessler

6 years agoreplace references to rtadvd(8) with rad(8)
florian [Mon, 23 Jul 2018 11:51:38 +0000 (11:51 +0000)]
replace references to rtadvd(8) with rad(8)
OK deraadt, phessler, jmc

6 years agoHandle duplicate address detection failures.
florian [Mon, 23 Jul 2018 06:14:14 +0000 (06:14 +0000)]
Handle duplicate address detection failures.

We get notified when duplication is detected on the route socket. For
privacy addresses simply generate a new random address. If we have
soii enabled increase the dad counter on the prefix and generate a new
address. For eui64 addresses nothing can be done.

6 years agoNo need to re-implement realloc(). Just use it
krw [Sun, 22 Jul 2018 21:32:04 +0000 (21:32 +0000)]
No need to re-implement realloc(). Just use it
the way the man page says.

ok tb@

6 years agocross reference sndio(7) and sndiod(8); from weerd@;
schwarze [Sun, 22 Jul 2018 19:11:44 +0000 (19:11 +0000)]
cross reference sndio(7) and sndiod(8); from weerd@;
OK ratchov@ jmc@ (who are both busy)

6 years agodocument method=https, and use it in the example config;
jmc [Sun, 22 Jul 2018 17:09:43 +0000 (17:09 +0000)]
document method=https, and use it in the example config;
from lauri tirkkonen;

ok sthen beck

6 years agoFirst iteration of implementing full mrt dumping/printing support in bgpctl.
claudio [Sun, 22 Jul 2018 17:07:53 +0000 (17:07 +0000)]
First iteration of implementing full mrt dumping/printing support in bgpctl.
This is good enough as a start but I guess output could be nicer.
OK benno@

6 years agoMove nexthop into struct filterstate (including nexthop flags) and use
claudio [Sun, 22 Jul 2018 16:59:08 +0000 (16:59 +0000)]
Move nexthop into struct filterstate (including nexthop flags) and use
them whereever possible. In some places (path_update, softreconfig_out
handler) the nexthop state is temporarily folded back into the rde_aspath.
Tested and OK benno@

6 years agoAdd more information to if_change() debug log using the new interface helper
claudio [Sun, 22 Jul 2018 16:55:01 +0000 (16:55 +0000)]
Add more information to if_change() debug log using the new interface helper
functions in util.c. The idea is to make even debug messages as informative
as possible.
Before:
if_change: ifindex 1, ifi_rdomain 0
After:
if_change: em0: rdomain 0 UP, Ethernet, active, 1000 Mbps
OK benno@

6 years agoMove functions to print link status etc. to util.c so that bgpd can use them
claudio [Sun, 22 Jul 2018 16:52:27 +0000 (16:52 +0000)]
Move functions to print link status etc. to util.c so that bgpd can use them
as well. OK benno@

6 years agoIn uvm_map_protect(), make sure we select a first map entry that ends after
kettenis [Sun, 22 Jul 2018 14:33:44 +0000 (14:33 +0000)]
In uvm_map_protect(), make sure we select a first map entry that ends after
the start of the range of pages that we're changing.  Prevents a panic from
a somewhat convoluted test case that anton@ came up with.

ok guenther@, anton@

6 years agoSwitch authorized_keys example from ssh-dss to ssh-rsa since the former
dtucker [Sun, 22 Jul 2018 12:16:59 +0000 (12:16 +0000)]
Switch authorized_keys example from ssh-dss to ssh-rsa since the former
is no longer enabled by default.  Pointed out by Daniel A. Maierhofer,
ok jmc

6 years agoFix arguments of pf_purge_expired_{src_nodes,rules}()
sf [Sun, 22 Jul 2018 09:09:18 +0000 (09:09 +0000)]
Fix arguments of pf_purge_expired_{src_nodes,rules}()

Due to the missing "void", this

   extern void pf_purge_expired_src_nodes();

is no prototype but a declaration. It is enough to suppress the
'implicit declaration' warning but it does not allow the compiler to
check the arguments passed to the calls of the function.

Fix the prototypes and don't pass the waslocked argument anymore. It has
been removed a year ago.

ok sashan henning

6 years agoTweak comment about truncating NULs to reflect new
krw [Sun, 22 Jul 2018 08:59:56 +0000 (08:59 +0000)]
Tweak comment about truncating NULs to reflect new
reality.

6 years agoWhen finished pulling an option out of a buffer, skip directly to the
krw [Sun, 22 Jul 2018 08:43:01 +0000 (08:43 +0000)]
When finished pulling an option out of a buffer, skip directly to the
next option. Don't rely on truncated NULs being ignored because
NUL == DHO_PAD.

ok tb@

6 years agohook up fchown
anton [Sun, 22 Jul 2018 06:39:46 +0000 (06:39 +0000)]
hook up fchown

6 years agoAdd regress covering the recently fixed NULL pointer deref in fchown().
anton [Sun, 22 Jul 2018 06:37:46 +0000 (06:37 +0000)]
Add regress covering the recently fixed NULL pointer deref in fchown().

6 years agoAvoid a NULL pointer deref when calling fchown() on a file descriptor belonging
anton [Sun, 22 Jul 2018 06:31:17 +0000 (06:31 +0000)]
Avoid a NULL pointer deref when calling fchown() on a file descriptor belonging
to a cloned device.

ok kettenis@

6 years agoAdjust a log message and make sure that the data pointer is never increased
claudio [Sun, 22 Jul 2018 06:03:17 +0000 (06:03 +0000)]
Adjust a log message and make sure that the data pointer is never increased
beyond the end. There was no access to it but still bad style.
OK tb@

6 years agoReading past the end of a buffer is bad, Even if the
krw [Sat, 21 Jul 2018 15:24:55 +0000 (15:24 +0000)]
Reading past the end of a buffer is bad, Even if the
extra byte is always there. Even if the byte contains
innocuous data that isn't used. Eeven if a particular
level of optimization of a particular compiler avoids
it by processing things backwards. Bad.

So simplify and correct logic. Perhaps even proof the
code against future generations of clever compilers.

Pointed out by Brandon Falk. Thanks!

ok millert@ tb@

6 years agocomment out a dead Xr;
jmc [Sat, 21 Jul 2018 09:39:25 +0000 (09:39 +0000)]
comment out a dead Xr;

6 years agosort;
jmc [Sat, 21 Jul 2018 09:35:50 +0000 (09:35 +0000)]
sort;

6 years agoInclude the vnode type in the panic message in ffs_write(), just like ffs_read()
anton [Sat, 21 Jul 2018 09:35:08 +0000 (09:35 +0000)]
Include the vnode type in the panic message in ffs_write(), just like ffs_read()
does.

ok deraadt@ kettenis@

6 years agoThere is no need to initialise global and static local variables to zero,
claudio [Sat, 21 Jul 2018 07:27:54 +0000 (07:27 +0000)]
There is no need to initialise global and static local variables to zero,
they are like that by default.
OK florian@

6 years agoRemove the "got meltdown?" conditional from INTRENTRY by doing it
guenther [Sat, 21 Jul 2018 02:19:54 +0000 (02:19 +0000)]
Remove the "got meltdown?" conditional from INTRENTRY by doing it
 unconditionally and codepatching it out on CPUs that don't need/do
 the mitigation.
Align the from-{kernel,userspace} targets in INTRENTRY with _ALIGN_TRAPS
Align x2apic_eoi using KUENTRY() instead of the artisinal
 segment+label+.globl bits it uses currently
s/testq/testb/ for SEL_RPL checks

ok kettenis@ mlarkin@

6 years agoThe newly added realpath(3) in vmd's parse.y checks whether the
bluhm [Fri, 20 Jul 2018 22:18:49 +0000 (22:18 +0000)]
The newly added realpath(3) in vmd's parse.y checks whether the
directories exist.  Create the path and file for test
vmd-fail-disk-path-too-long.

6 years agoListen on 127.0.0.1 and ::1 in the regress config since the test use localhost
claudio [Fri, 20 Jul 2018 21:59:53 +0000 (21:59 +0000)]
Listen on 127.0.0.1 and ::1 in the regress config since the test use localhost
which can be resolved to either of the two values.
OK bluhm@

6 years agoRemove a few leftovers from the days of emulation, which could result in
deraadt [Fri, 20 Jul 2018 21:57:26 +0000 (21:57 +0000)]
Remove a few leftovers from the days of emulation, which could result in
a bad/corrupt binary not returning ENOEXEC but some other error.
ok guenther kettenis bluhm

6 years agoFail if a PT_LOAD segment has a memory size of 0. This prevents a panic
kettenis [Fri, 20 Jul 2018 21:48:27 +0000 (21:48 +0000)]
Fail if a PT_LOAD segment has a memory size of 0.  This prevents a panic
later on, and it makes no sense for a binary to have such a segment.

ok bluhm@, guenther@

6 years agoadd pledge(2), it only needs rpath if reading from a file
mestre [Fri, 20 Jul 2018 21:47:07 +0000 (21:47 +0000)]
add pledge(2), it only needs rpath if reading from a file

hint from tb@ and OK ratchov@

6 years agozap whitespaces
mestre [Fri, 20 Jul 2018 21:44:41 +0000 (21:44 +0000)]
zap whitespaces

6 years agoNo need to copy rdns_lifetime around with an IMSG, it gets send to the
florian [Fri, 20 Jul 2018 20:35:00 +0000 (20:35 +0000)]
No need to copy rdns_lifetime around with an IMSG, it gets send to the
engine end frontend as part of ra_iface_conf.

Spotted after explaining to bket@ that a similar pattern is not needed
for the mtu option.

6 years agoFix mem leaks on config reload:
florian [Fri, 20 Jul 2018 20:34:18 +0000 (20:34 +0000)]
Fix mem leaks on config reload:
- always free struct ra_iface_conf with free_ra_iface_conf()
- free_ra_iface_conf() needs to free the recently added
nameserver and search list

6 years agofix mem leak: missing freeifaddrs
florian [Fri, 20 Jul 2018 20:33:29 +0000 (20:33 +0000)]
fix mem leak: missing freeifaddrs

6 years agoIntroduce MTU option.
bket [Fri, 20 Jul 2018 17:55:09 +0000 (17:55 +0000)]
Introduce MTU option.

The MTU option is used in Router Advertisement messages to ensure that
all nodes on a link use the same MTU value in those cases where the link
MTU is not well known.

Feedback (thank you!) and OK from florian@

6 years agoWe need to track the auto prefix in ra_prefix_conf otherwise we can't
florian [Fri, 20 Jul 2018 17:48:58 +0000 (17:48 +0000)]
We need to track the auto prefix in ra_prefix_conf otherwise we can't
configure its options. Trying so lead to a crash.
Found the hard way by & OK sthen

6 years agoNow that aliases in smtpd.conf default to plain text files and not
millert [Fri, 20 Jul 2018 15:35:33 +0000 (15:35 +0000)]
Now that aliases in smtpd.conf default to plain text files and not
db files we don't want to tell people to run makemap instead of
newaliases.  OK deraadt@ jmc@

6 years agoMove the nlri_get_prefix functions to util.c so that bgpctl can use them too.
claudio [Fri, 20 Jul 2018 14:58:20 +0000 (14:58 +0000)]
Move the nlri_get_prefix functions to util.c so that bgpctl can use them too.

6 years agoRename rde_update_get_prefix and friends to nlri_get_prefix. Will be moved
claudio [Fri, 20 Jul 2018 14:49:15 +0000 (14:49 +0000)]
Rename rde_update_get_prefix and friends to nlri_get_prefix. Will be moved
to util.c shortly so that bgpctl can use those functions too.

6 years agoRename rde_update_extract_prefix to extract_prefix and make it static.
claudio [Fri, 20 Jul 2018 14:14:43 +0000 (14:14 +0000)]
Rename rde_update_extract_prefix to extract_prefix and make it static.
This is just an internal of the the rde_update_get_prefix functions.

6 years agoRename "resolver" to "nameserver" in the configuration file.
florian [Fri, 20 Jul 2018 13:17:02 +0000 (13:17 +0000)]
Rename "resolver" to "nameserver" in the configuration file.

resolv.conf(5) and dhclient(8) are using the term nameserver for many
years, there is no good reason to be different here.

Pointed out by deraadt

6 years agoPrint the timestamp embedded in mrt files for update and status messages.
claudio [Fri, 20 Jul 2018 12:49:49 +0000 (12:49 +0000)]
Print the timestamp embedded in mrt files for update and status messages.
Also implemented the extended precision format so microseconds are printed
as well when available. The output is relative to the previous message and
follows what kdump does.
OK benno@

6 years agoThere is no need to have bgpd running when running bgpctl show mrt.
claudio [Fri, 20 Jul 2018 12:42:45 +0000 (12:42 +0000)]
There is no need to have bgpd running when running bgpctl show mrt.
The first thing the code actually does is closing the socket. Instead
move the code up to where currently the IRR filter code is.
Additionally change the late pledges to just stdio since nothing after
that needs rpath or wpath.
OK benno@

6 years agoAdd missing RCS Id.
helg [Fri, 20 Jul 2018 12:05:08 +0000 (12:05 +0000)]
Add missing RCS Id.

6 years agoStop checking table commands for `create'
kn [Fri, 20 Jul 2018 11:16:55 +0000 (11:16 +0000)]
Stop checking table commands for `create'

Tiny left over from 2003 when it was removed. Twist the logic by checking
for `show' and `test' to make it even simpler.

OK sashan henning

6 years agoadd regress test for "bypassunveil" where a path should be unveil'd by
robert [Fri, 20 Jul 2018 10:47:37 +0000 (10:47 +0000)]
add regress test for "bypassunveil" where a path should be unveil'd by
specific pledge(2) calls

ok beck@

6 years agoinform that diagnostics in functions won't work, but don't error out
espie [Fri, 20 Jul 2018 10:02:03 +0000 (10:02 +0000)]
inform that diagnostics in functions won't work, but don't error out
flatly.

this will help sparc64 compile code without needing to patch away recent
pragma diagnostic use.

problem found by landry@

okay kettenis@, guenther@

6 years agoCorrectly copy across unveil's from parent to child process on fork().
beck [Fri, 20 Jul 2018 07:28:36 +0000 (07:28 +0000)]
Correctly copy across unveil's from parent to child process on fork().

6 years agomatch on marvell,armada-38x-uart linux >= 4.18-rc1 changed the compat
jsg [Fri, 20 Jul 2018 05:37:06 +0000 (05:37 +0000)]
match on marvell,armada-38x-uart linux >= 4.18-rc1 changed the compat
string from snps,dw-apb-uart in b7639b0b15ddd1a4686b0142e70dfb122eefc88f

ok patrick@

6 years agoslightly-clearer description for AuthenticationMethods - the lists
djm [Fri, 20 Jul 2018 05:01:10 +0000 (05:01 +0000)]
slightly-clearer description for AuthenticationMethods - the lists
have comma-separated elements; bz#2663 from Hans Meier

6 years agoremove unused zlib.h
djm [Fri, 20 Jul 2018 03:46:34 +0000 (03:46 +0000)]
remove unused zlib.h

6 years agoMissed a 'ksi' -> '*ksip' change in previous commit
guenther [Fri, 20 Jul 2018 01:30:30 +0000 (01:30 +0000)]
Missed a 'ksi' -> '*ksip' change in previous commit

6 years agoFix typo in comment. From Alexandru Iacob via github.
dtucker [Thu, 19 Jul 2018 23:03:16 +0000 (23:03 +0000)]
Fix typo in comment.  From Alexandru Iacob via github.

6 years agoi found a nicer way to describe -join;
jmc [Thu, 19 Jul 2018 19:16:36 +0000 (19:16 +0000)]
i found a nicer way to describe -join;

6 years agoEnable kernel profiling on arm64
drahn [Thu, 19 Jul 2018 17:38:12 +0000 (17:38 +0000)]
Enable kernel profiling on arm64
sigcode() runs in user land context, so should not call mcount.
Without the symbol type on the exception entry functions, gprof
doesn't correctly identify the caller for exception entry symbols.
ok kettenis@

6 years agoattach RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 at gmail>
sthen [Thu, 19 Jul 2018 17:34:22 +0000 (17:34 +0000)]
attach RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 at gmail>

6 years agosync
sthen [Thu, 19 Jul 2018 17:33:42 +0000 (17:33 +0000)]
sync

6 years agoAdd RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 at gmail>
sthen [Thu, 19 Jul 2018 17:33:26 +0000 (17:33 +0000)]
Add RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 at gmail>

6 years agoReuse implicit padding to export the port number of a USB device in
mpi [Thu, 19 Jul 2018 12:35:14 +0000 (12:35 +0000)]
Reuse implicit padding to export the port number of a USB device in
USB_DEVICEINFO.

devel/libusb1 requires this piece of information.

ok jcs@, mikeb@, jasper@, sthen@

6 years agoDeprecate UsePrivilegedPort now that support for running ssh(1)
dtucker [Thu, 19 Jul 2018 10:28:47 +0000 (10:28 +0000)]
Deprecate UsePrivilegedPort now that support for running ssh(1)
setuid has been removed, remove supporting code and clean up
references to it in the man pages

We have not shipped ssh(1) the setuid bit since 2002.  If ayone
really needs to make connections from a low port number this can
be implemented via a small setuid ProxyCommand.

ok markus@ jmc@ djm@

6 years agorevert previous, something isn't quite right as clients see ntpd
sthen [Thu, 19 Jul 2018 10:20:09 +0000 (10:20 +0000)]
revert previous, something isn't quite right as clients see ntpd
as unsynced. reported by naddy, also seen by me (I noticed because
monitoring-plugins check_ntp complained). ok claudio henning

6 years agoieee80211_ess_is_better() returns 0 or 1, comparing > 1 is always
florian [Thu, 19 Jul 2018 09:16:17 +0000 (09:16 +0000)]
ieee80211_ess_is_better() returns 0 or 1, comparing > 1 is always
false so we always selected the first wifi available, not the best
one.

While here shuffle some deck chairs to make it clearer that anything is
better than nothing.

tweak & OK phessler

6 years agoAdd regress test for inheritance of unveil's across fork to children
beck [Thu, 19 Jul 2018 06:40:22 +0000 (06:40 +0000)]
Add regress test for inheritance of unveil's across fork to children

6 years agoRemove the unused leftovers of the 4.4BSD libm, which was only used
naddy [Wed, 18 Jul 2018 20:21:12 +0000 (20:21 +0000)]
Remove the unused leftovers of the 4.4BSD libm, which was only used
on non-IEEE platforms.  Since the VAX port was discontinued, all
our remaining architectures use IEEE floating point, as will any
future ones.
ok millert@ tb@

6 years agoConvert from fgetln(3) to getline(3). Based on a diff from Lauri Tirkkonen.
millert [Wed, 18 Jul 2018 17:20:54 +0000 (17:20 +0000)]
Convert from fgetln(3) to getline(3).  Based on a diff from Lauri Tirkkonen.
With a tweak and OK from schwarze@

6 years agoRevert the change that delivers process signals to any threads. As
bluhm [Wed, 18 Jul 2018 16:55:17 +0000 (16:55 +0000)]
Revert the change that delivers process signals to any threads.  As
side effect pending signals specifically sent to the main thread
were handled by other threads.  This made gcj in textproc/pdftk
port build stall.
Noticed and tested by espie@.

6 years agoBob's license was missing, add it.
tb [Wed, 18 Jul 2018 16:24:16 +0000 (16:24 +0000)]
Bob's license was missing, add it.

ok beck

6 years agoreplace manual zero initialization of various fields with memset;
florian [Wed, 18 Jul 2018 15:46:49 +0000 (15:46 +0000)]
replace manual zero initialization of various fields with memset;
makes the code shorter and easier to read.
suggested by & OK claudio

6 years agoStop our own router advertisements from looping back to us.
florian [Wed, 18 Jul 2018 14:43:34 +0000 (14:43 +0000)]
Stop our own router advertisements from looping back to us.
Pointed out by semarie@