openbsd
5 years agoSimplify the table backend interface: lookup results are returned
eric [Sun, 23 Dec 2018 15:53:24 +0000 (15:53 +0000)]
Simplify the table backend interface: lookup results are returned
as strings, and parsing is handled by the upper layer.

ok gilles@

5 years agowhen a filter chain is only used once, no need to create a named chain, it
gilles [Sun, 23 Dec 2018 15:49:04 +0000 (15:49 +0000)]
when a filter chain is only used once, no need to create a named chain, it
can now be inlined on listen lines:  listen on all filter { foo1, foo2 }

5 years agowhen passing mail-from parameter to filters, pass the '<' '>' free version
gilles [Sun, 23 Dec 2018 15:48:16 +0000 (15:48 +0000)]
when passing mail-from parameter to filters, pass the '<' '>' free version

5 years agoDeprecate .Lp, use .Pp instead.
schwarze [Sun, 23 Dec 2018 15:32:10 +0000 (15:32 +0000)]
Deprecate .Lp, use .Pp instead.
Simplicity matters, and fewer macros is simpler.
OK jmc@

5 years agosimplify builtins
gilles [Sun, 23 Dec 2018 15:14:49 +0000 (15:14 +0000)]
simplify builtins

5 years agorevive filters tracing (-T filters) to make it easier understand what is
gilles [Sun, 23 Dec 2018 14:26:02 +0000 (14:26 +0000)]
revive filters tracing (-T filters) to make it easier understand what is
happening at filters level

5 years agoAdd regress suite for the noperm mfs mount flag. Protection of the root vnode
natano [Sun, 23 Dec 2018 11:23:21 +0000 (11:23 +0000)]
Add regress suite for the noperm mfs mount flag. Protection of the root vnode
should be effective now. Let's make sure it stays that way.

5 years agoRectify some issues with the noperm mount flag; the root vnode was not
natano [Sun, 23 Dec 2018 10:46:51 +0000 (10:46 +0000)]
Rectify some issues with the noperm mount flag; the root vnode was not
protected properly and files without any x bit set were accidentaly considered
executable when checked with access(2).

Issues found and reported by deraadt, halex, reyk, tb
ok deraadt

5 years agoEVP_MD_CTX_cleanup() is deprecated and doesn't free, so recommend using
tb [Sun, 23 Dec 2018 08:35:14 +0000 (08:35 +0000)]
EVP_MD_CTX_cleanup() is deprecated and doesn't free, so recommend using
EVP_MD_CTX_free() instead if the goal is to avoid leaking memory.

From my corresponding upstream commit, reminded by schwarze

5 years agoDocument EVP_PKEY_new_mac_key(3);
schwarze [Sat, 22 Dec 2018 23:19:53 +0000 (23:19 +0000)]
Document EVP_PKEY_new_mac_key(3);
from Matt Caswell <matt at openssl dot org>
via OpenSSL commit d45a97f4 Mar 5 17:41:49 2018 +0000.

5 years agoIn the TOC, close <a> before opening <ul>.
schwarze [Sat, 22 Dec 2018 19:48:46 +0000 (19:48 +0000)]
In the TOC, close <a> before opening <ul>.
Simplified version of a bugfix patch from rapha@.

5 years agosync
deraadt [Sat, 22 Dec 2018 17:33:39 +0000 (17:33 +0000)]
sync

5 years agobgpctl can cause bgpd to do a lot of work (e.g. dumping all of the RIB)
claudio [Sat, 22 Dec 2018 16:12:40 +0000 (16:12 +0000)]
bgpctl can cause bgpd to do a lot of work (e.g. dumping all of the RIB)
but then bgpctl can quickly exit and bgpd still has to do all the work.
Instead introduce a terminate imsg to stop such long running commands if
bgpctl closes the connection before the run is over.
OK benno@, sthen@, deraadt@

5 years agoAvoid using m_trailingspace(9) on an mbuf allocated with MGET(9) as it relies
kettenis [Sat, 22 Dec 2018 14:42:29 +0000 (14:42 +0000)]
Avoid using m_trailingspace(9) on an mbuf allocated with MGET(9) as it relies
on header fields that aren't initialized, which may trigger an assertion.
Check whether the control message doesn't exceed MLEN instead and turn the
check into a KASSERT as the driver should not generate control messages
that are larger.

with help form claudio@ (who points out that the driver should not use
MT_CONTROL here).

ok patrick@

5 years agointroduce 'rcpt-to' builtin filter, can only be used on 'rcpt-to' hook
gilles [Sat, 22 Dec 2018 13:09:05 +0000 (13:09 +0000)]
introduce 'rcpt-to' builtin filter, can only be used on 'rcpt-to' hook

5 years agointroduce 'mail-from' builtin filter, can be applied on the 'mail-from',
gilles [Sat, 22 Dec 2018 12:31:40 +0000 (12:31 +0000)]
introduce 'mail-from' builtin filter, can be applied on the 'mail-from',
'rcpt-to', 'data' and 'commit' phases.

5 years agointroduce 'helo' builtin filter, can be used on any hook but 'connect'
gilles [Sat, 22 Dec 2018 12:17:16 +0000 (12:17 +0000)]
introduce 'helo' builtin filter, can be used on any hook but 'connect'

5 years agoremove lka_filter_response() which is no longer used, and reshuffle a bit
gilles [Sat, 22 Dec 2018 11:32:43 +0000 (11:32 +0000)]
remove lka_filter_response() which is no longer used, and reshuffle a bit
the functions within the file to make it easier to read

5 years agosimplify filter_protocol / filter_protocol_next by factoring code
gilles [Sat, 22 Dec 2018 11:28:11 +0000 (11:28 +0000)]
simplify filter_protocol / filter_protocol_next by factoring code

while at it comment both filter_protocol_internal and filter_data_internal,
the gilles@ that will read this in six months will thank me.

5 years agosimplify filter_data() and filter_data_next() by factoring logic
gilles [Sat, 22 Dec 2018 10:39:16 +0000 (10:39 +0000)]
simplify filter_data() and filter_data_next() by factoring logic

5 years agoAdd support for R_MIPS_PC32 relocation. It is needed for linking code
visa [Sat, 22 Dec 2018 10:31:01 +0000 (10:31 +0000)]
Add support for R_MIPS_PC32 relocation. It is needed for linking code
that has been compiled using clang.

The added code is based on old binutils code from year 2000.

Prodded by and OK jca@, OK kettenis@ guenther@

5 years agotree_xget() -> tree_get()
gilles [Sat, 22 Dec 2018 10:18:56 +0000 (10:18 +0000)]
tree_xget() -> tree_get()

5 years agoreuse existing tokens for builtin filter names to avoid creating too many
gilles [Sat, 22 Dec 2018 09:30:19 +0000 (09:30 +0000)]
reuse existing tokens for builtin filter names to avoid creating too many
new keywords, 'check-rdns' & 'check-src' are not better than 'rdns' & 'src'

5 years agointroduce new matching criteria 'from rdns' to match sessions based on rDNS
gilles [Sat, 22 Dec 2018 08:54:02 +0000 (08:54 +0000)]
introduce new matching criteria 'from rdns' to match sessions based on rDNS
of the client, works with literal and tables, both string and regex:

match from rdns "mx1.poolp.org" for any action blahblah

5 years agoremove space
gilles [Sat, 22 Dec 2018 08:18:55 +0000 (08:18 +0000)]
remove space

prompted by jmc@

5 years agoDelete irrelevant HISTORY details. Simply use BN_rand(3); there
schwarze [Sat, 22 Dec 2018 00:03:51 +0000 (00:03 +0000)]
Delete irrelevant HISTORY details.  Simply use BN_rand(3); there
is no need to know at which time BN_pseudo_rand(3) was made the
same as BN_rand(3).  Considering that question might even mislead
people to attempt ill-advised #ifdef'ing.
Pointed out by deraadt@.

5 years agoThe wrong header file was given for EVP_PKEY_CTX_set_signature_md(3).
schwarze [Fri, 21 Dec 2018 23:51:42 +0000 (23:51 +0000)]
The wrong header file was given for EVP_PKEY_CTX_set_signature_md(3).
Also clarify to which algorithms it applies.
From Matt Caswell <matt at openssl dot org>
via OpenSSL commit d45a97f4 Mar 5 17:41:49 2018 +0000.

Document
EVP_PKEY_CTX_get_rsa_padding(3), EVP_PKEY_CTX_get_rsa_pss_saltlen(3),
EVP_PKEY_CTX_set_rsa_mgf1_md(3), and EVP_PKEY_CTX_get_rsa_mgf1_md(3).
From Antoine Salon <asalon at vmware dot com>
via OpenSSL commit 87103969 Oct 1 14:11:57 2018 -0700
from the OpenSSL_1_1_1-stable branch, which is still under a free license.

5 years agoDocument the ECDSA_SIG_new(3) return value.
schwarze [Fri, 21 Dec 2018 22:13:28 +0000 (22:13 +0000)]
Document the ECDSA_SIG_new(3) return value.
Inspired by OpenSSL commit 6da34cfb Jun 2 16:17:32 2018 -0400
by Ken Goldman <kgoldman at us dot ibm dot com>,
but use the same wording as in ASN1_item_new(3) instead.

5 years agoClarify behaviour of DH_get0_pqg(3) and DH_get0_key(3) with NULL arguments;
schwarze [Fri, 21 Dec 2018 21:54:48 +0000 (21:54 +0000)]
Clarify behaviour of DH_get0_pqg(3) and DH_get0_key(3) with NULL arguments;
from <Matthias dot St dot Pierre at ncp dash e dot com>
via OpenSSL commit 5777254b May 27 09:07:07 2018 +0200.

5 years agogrammar and style fixes from wesinator at github
schwarze [Fri, 21 Dec 2018 21:36:21 +0000 (21:36 +0000)]
grammar and style fixes from wesinator at github
via OpenSSL commit 521738e9 Oct 5 14:58:30 2018 -0400

5 years agosince we already support regex lookups in tables for builtin filters, let's
gilles [Fri, 21 Dec 2018 21:35:29 +0000 (21:35 +0000)]
since we already support regex lookups in tables for builtin filters, let's
also support regex lookups in match rule criterias performing table lookups

ok millert@

5 years agodo not tree_xget() sessions in filter_protocol_next(), filter_data_next() &
gilles [Fri, 21 Dec 2018 20:38:42 +0000 (20:38 +0000)]
do not tree_xget() sessions in filter_protocol_next(), filter_data_next() &
lka_proc_filter_in_session() because there are legitimate reasons a session
would no longer be around.

5 years agoSince OpenBSD 6.1, BN_pseudo_rand*(3) does the same as BN_rand*(3).
schwarze [Fri, 21 Dec 2018 20:09:04 +0000 (20:09 +0000)]
Since OpenBSD 6.1, BN_pseudo_rand*(3) does the same as BN_rand*(3).
Say so, and note that OpenSSL followed suit in 1.1.0 according
to OpenSSL commit 5ecff87d Jun 21 13:55:02 2017 +0100.

5 years agoMention that some functions call BN_GENCB_call(3) with a second
schwarze [Fri, 21 Dec 2018 19:30:19 +0000 (19:30 +0000)]
Mention that some functions call BN_GENCB_call(3) with a second
argument of 3; from Beat Bolli <dev at drbeat dot li>
via OpenSSL commit bd93f1ac Jul 28 16:45:22 2018 -0400.

5 years ago- make the proc filter fd non-blocking
gilles [Fri, 21 Dec 2018 19:07:47 +0000 (19:07 +0000)]
- make the proc filter fd non-blocking
- client sessions may disappear while filter is streaming data, dont panic

5 years agoin lka_filter_init(), split into two passes, one to deal with filters then
gilles [Fri, 21 Dec 2018 17:31:57 +0000 (17:31 +0000)]
in lka_filter_init(), split into two passes, one to deal with filters then
another one to associate filters to chains

5 years agouse ss_src in src builtin filters
gilles [Fri, 21 Dec 2018 17:22:50 +0000 (17:22 +0000)]
use ss_src in src builtin filters

5 years agoimplement some additional builtin filters:
gilles [Fri, 21 Dec 2018 17:04:46 +0000 (17:04 +0000)]
implement some additional builtin filters:
check-src-{table,regex}, check-rdns-{table,regex}

make sure that these builtins may be used at all phases

5 years agoRename mandoc_getarg() to roff_getarg() and pass it the roff parser
schwarze [Fri, 21 Dec 2018 16:58:49 +0000 (16:58 +0000)]
Rename mandoc_getarg() to roff_getarg() and pass it the roff parser
struct as an argument such that after copy-in, it can call roff_expand()
once again, which used to be called roff_res() before this.  This
fixes a subtle low-level roff(7) parsing bug reported by Fabio
Scotoni <fabio at esse dot ch> in the 4.4BSD-Lite2 mdoc.samples(7)
manual page, because that page used an escaped escape sequence in
a macro argument.

To expand escaped escape sequences in quoted mdoc(7) arguments, too,
stop bypassing the call to roff_getarg() in mdoc_argv.c, function args()
for this case.  This does not solve the case of escaped escape sequences
in quoted .Bl -column phrases yet.

Because roff_expand() can make the string longer, roff_getarg() can no
longer operate in-place but needs to malloc(3) the returned string.
In the high-level parsers, free(3) that string after processing it.

5 years agostart simplifying log lines, they're no longer intended to be parseable, we
gilles [Fri, 21 Dec 2018 14:41:41 +0000 (14:41 +0000)]
start simplifying log lines, they're no longer intended to be parseable, we
have a reporting API for tools that want to analyze events, maillog is just
for us, hoomans.

similar work will be brought to other logs in upcoming diffs

ok eric@

5 years agoRemove outdated instruction.
visa [Fri, 21 Dec 2018 14:35:56 +0000 (14:35 +0000)]
Remove outdated instruction.

5 years agobring in new grammar for filters, allowing filter chains and plugging of
gilles [Fri, 21 Dec 2018 14:33:52 +0000 (14:33 +0000)]
bring in new grammar for filters, allowing filter chains and plugging of
different filters & chains on different interfaces.

in this diff, proc filters are still disabled as they're missing on very
important piece of logic.

ok eric@

5 years agoDocument how to boot from SD/MMC or SATA on U-Boot. Also mention that
visa [Fri, 21 Dec 2018 14:33:43 +0000 (14:33 +0000)]
Document how to boot from SD/MMC or SATA on U-Boot. Also mention that
the root disk may be specified by DUID.

Initial diff by Chris McGee

5 years agomake sure that test is not run in interactive mode, since the failing
espie [Fri, 21 Dec 2018 14:04:53 +0000 (14:04 +0000)]
make sure that test is not run in interactive mode, since the failing
code path changed slightly

5 years agodo not try merging packages that are already kept, the forward dependency
espie [Fri, 21 Dec 2018 14:04:19 +0000 (14:04 +0000)]
do not try merging packages that are already kept, the forward dependency
check did fail

(noticed by bluhm@)

5 years agoDo PAT setup earlier such that mapping the framebuffer WC works at the
kettenis [Fri, 21 Dec 2018 12:02:55 +0000 (12:02 +0000)]
Do PAT setup earlier such that mapping the framebuffer WC works at the
point where we remap it.

ok deraadt@, mlarkin@

5 years agoDIOCIGETIFACES provides interfaces and groups, not drivers
kn [Fri, 21 Dec 2018 11:16:04 +0000 (11:16 +0000)]
DIOCIGETIFACES provides interfaces and groups, not drivers

"driver" is a left-over from earlier implementations.

Nowadays each driver such as lo(4) has it's respective interface group of
the same name ("lo"), but additional driver-independent groups exist, too:

# ifconfig lo0 group foo
# pfctl -s I -i foo
foo
lo0

OK henning

5 years agoAdd support for {preinit,init,fini}_array sections in static binaries
guenther [Fri, 21 Dec 2018 05:45:42 +0000 (05:45 +0000)]
Add support for {preinit,init,fini}_array sections in static binaries

ok kettenis@

5 years agoremove intr_find_mpmapping proto func removed in intr.c rev 1.31 in 2011
jsg [Fri, 21 Dec 2018 01:51:07 +0000 (01:51 +0000)]
remove intr_find_mpmapping proto func removed in intr.c rev 1.31 in 2011

5 years agosync
deraadt [Fri, 21 Dec 2018 01:29:22 +0000 (01:29 +0000)]
sync

5 years agotweak previous;
jmc [Thu, 20 Dec 2018 23:57:06 +0000 (23:57 +0000)]
tweak previous;

5 years ago.Nm, not Nm.
dlg [Thu, 20 Dec 2018 23:16:47 +0000 (23:16 +0000)]
.Nm, not Nm.

5 years agoadd bpe(4) or Backbone Provider Edge interfaces
dlg [Thu, 20 Dec 2018 23:00:55 +0000 (23:00 +0000)]
add bpe(4) or Backbone Provider Edge interfaces

Backbone refers to 802.1ah or 802.1Q Provider Backbone Bridges
(PBB), or mac-in-mac, which is like vlans except it completely
encapsulates the inner packet rather than just add a shim to it.
This removes the need for Backbone Core Bridges (ie, switches between
bpe instances) to know all the addresses on all the networks.

5 years agoMove the full responsibility for reporting open(2) errors from
schwarze [Thu, 20 Dec 2018 21:27:51 +0000 (21:27 +0000)]
Move the full responsibility for reporting open(2) errors from
mparse_open() to the caller.  That is better because only the caller
knows its preferred reporting method and format and only the caller
has access to all the data that should be included - like the column
number in .so processing or the current manpath in makewhatis(8).
Moving the mandoc_msg() call out is possible because the caller can
call strerror(3) just as easily as mparse_open() can.

Move mandoc_msg_setinfilename() closer to the parsing of the file
contents, to avoid problems *with* the file (like non-existence,
lack of permissions, etc.) getting misreported as problems *in*
the file.

Fix the column number reported for .so failure:
let it point to the beginning of the filename.

Taken together, this prevents makewhatis(8) from spewing confusing
messages about .so failures to stderr, a bug reported by
Raf Czlonka <rczlonka at gmail dot com> on ports@.

It also prevents mandoc(1) from issuing *two* messages for every
single .so failure.

5 years agothe ciphers part of tls log lines doesn't need to be quoted, mta_session.c
gilles [Thu, 20 Dec 2018 19:57:30 +0000 (19:57 +0000)]
the ciphers part of tls log lines doesn't need to be quoted, mta_session.c
has it right, make smtp_session.c use the same format

5 years agouse HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
gilles [Thu, 20 Dec 2018 19:50:39 +0000 (19:50 +0000)]
use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header

5 years agouse the machine hostname, not localhost, in mail.maildir.c
gilles [Thu, 20 Dec 2018 19:45:17 +0000 (19:45 +0000)]
use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@

5 years agochange the format of ssl_to_text() to match that of io's, this only affect
gilles [Thu, 20 Dec 2018 19:40:13 +0000 (19:40 +0000)]
change the format of ssl_to_text() to match that of io's, this only affect
smtp and mta "tls" log lines and tls event reporting

5 years agosync
deraadt [Thu, 20 Dec 2018 18:47:16 +0000 (18:47 +0000)]
sync

5 years agoExplain what the fields in mandoc messages mean,
schwarze [Thu, 20 Dec 2018 18:23:18 +0000 (18:23 +0000)]
Explain what the fields in mandoc messages mean,
rather than merely specifying the message syntax.
Gap in documentation found while looking at a bug
report from Raf Czlonka <rczlonka at gmail dot com>.

5 years agocall smtp_check_noparam() on RSET, DATA, NOOP, QUIT, WIZ
gilles [Thu, 20 Dec 2018 17:57:44 +0000 (17:57 +0000)]
call smtp_check_noparam() on RSET, DATA, NOOP, QUIT, WIZ

5 years ago6.2 keys no longer required
deraadt [Thu, 20 Dec 2018 15:57:14 +0000 (15:57 +0000)]
6.2 keys no longer required

5 years agoReplace a wrong poor mans m_trailingspace() with the real thing. The mbuf
claudio [Thu, 20 Dec 2018 13:27:54 +0000 (13:27 +0000)]
Replace a wrong poor mans m_trailingspace() with the real thing. The mbuf
passed to ip_pcbopts could be a cluster and so the size check is all wrong.
found by Greg Steuck; OK bluhm@

Reported-by: syzbot+c2543ae6b6692a5843e3@syzkaller.appspotmail.com
eVS: ----------------------------------------------------------------------

5 years agoThe timeouts in nd6 are in msec so just use timeout_add_msec() instead
claudio [Thu, 20 Dec 2018 10:28:58 +0000 (10:28 +0000)]
The timeouts in nd6 are in msec so just use timeout_add_msec() instead
of some complicated match to convert them to ticks.
OK visa@ bluhm@ kn@

5 years agoConvert to timeout_add_msec instead of counting ticks.
claudio [Thu, 20 Dec 2018 10:27:37 +0000 (10:27 +0000)]
Convert to timeout_add_msec instead of counting ticks.
OK visa@ bluhm@ kn@

5 years agoMake this not hz dependent by using timeout_add_sec() also rename the
claudio [Thu, 20 Dec 2018 10:26:36 +0000 (10:26 +0000)]
Make this not hz dependent by using timeout_add_sec() also rename the
define to IFNET_SLOWTIMO since it is no longer a hz divisor.
OK visa@ bluhm@ kn@

5 years agoMove a badly positioned parenthesis that caused nonsensical movement
schwarze [Thu, 20 Dec 2018 09:55:44 +0000 (09:55 +0000)]
Move a badly positioned parenthesis that caused nonsensical movement
properties for the Wumpus.  The bug has been present since 4.3BSD-Reno
and was introduced by Keith Bostic on February 14, 1990 when committing
the major rewrite from Dave Taylor.

Patch (accompanied by a detailed functional and historical analysis)
from David Fifield <david at bamsoftware dot com> on bugs@.

With all the bats in these caves, how could a bug possibly survive
for twenty-eight years?

5 years agozap whitespace
anton [Thu, 20 Dec 2018 07:23:22 +0000 (07:23 +0000)]
zap whitespace

5 years agoLLDP has it's own group address, so teach tcpdump about it.
dlg [Thu, 20 Dec 2018 03:39:29 +0000 (03:39 +0000)]
LLDP has it's own group address, so teach tcpdump about it.

ok deraadt@

5 years agoBugfix:
schwarze [Thu, 20 Dec 2018 03:38:10 +0000 (03:38 +0000)]
Bugfix:
When after a \\, \t, or \a, another \t or \a had to be resolved
in copy mode within the same argument, the argument got corrupted.
Found while working on a loosely related bug report
from Fabio Scotoni <fabio at esse dot ch>.

5 years agoCorrectly describe the return values of BN_hex2bn(3) and BN_dec2bn(3).
schwarze [Wed, 19 Dec 2018 21:53:53 +0000 (21:53 +0000)]
Correctly describe the return values of BN_hex2bn(3) and BN_dec2bn(3).
Inspired by OpenSSL commit a130950d Aug 23 12:06:41 2017 -0400
by Rich Salz <rsalz at openssl dot org>, but using a more explicit
wording, and fixing *both* places rather than only half of them.

5 years agoTest the code path where soreceive(9) sleeps and a control mbuf is
bluhm [Wed, 19 Dec 2018 21:21:59 +0000 (21:21 +0000)]
Test the code path where soreceive(9) sleeps and a control mbuf is
inserted into the stream.

5 years agoSpecify the return values of some of these functions more precisely;
schwarze [Wed, 19 Dec 2018 21:12:58 +0000 (21:12 +0000)]
Specify the return values of some of these functions more precisely;
inspired by OpenSSL commit 1f13ad31 Dec 25 17:50:39 2017 +0800
by Paul Yang <yang sot yang at baishancloud dot com>,
but without creating a RETURN VALUES section because that makes
no sense here: it would either result in a confusing order of
information or in duplicate information.

5 years agotypo;
schwarze [Wed, 19 Dec 2018 20:30:09 +0000 (20:30 +0000)]
typo;
from Jakub Wilk <jwilk at jwilk dot net> via
OpenSSL commit a21285b3 Aug 21 18:30:34 2018 +0200

5 years agoBasic config test for various ext-community options.
claudio [Wed, 19 Dec 2018 15:30:13 +0000 (15:30 +0000)]
Basic config test for various ext-community options.

5 years agoAdjust bgpctl now that filter_extcommunity is no more.
claudio [Wed, 19 Dec 2018 15:27:29 +0000 (15:27 +0000)]
Adjust bgpctl now that filter_extcommunity is no more.
OK benno@

5 years agoFold ext-communities into filter_community so that bgpd can match
claudio [Wed, 19 Dec 2018 15:26:42 +0000 (15:26 +0000)]
Fold ext-communities into filter_community so that bgpd can match
multiple ext-communities at the same time as well. Additionally this fixes
parsing some of the ext-community types. Now all communities are handled
by one common struct.
OK benno@ plus some input from denis@

5 years agoget rid of a prototype for if_enqueue_try()
dlg [Wed, 19 Dec 2018 05:31:28 +0000 (05:31 +0000)]
get rid of a prototype for if_enqueue_try()

it isn't implemented, and is never called.

5 years agouse Sq for single chars, and escape ";" properly;
jmc [Tue, 18 Dec 2018 23:05:03 +0000 (23:05 +0000)]
use Sq for single chars, and escape ";" properly;

5 years agoAs a first step towards making roff_res() callable from mandoc_getarg(),
schwarze [Tue, 18 Dec 2018 21:58:41 +0000 (21:58 +0000)]
As a first step towards making roff_res() callable from mandoc_getarg(),
move the function mandoc_getarg() from mandoc.c to roff.c.  It was
misplaced in mandoc.c in the first place; that file is intended for
utilities needed both by parsers and by formatters, while reading
macro arguments in copy mode is purely a task of the roff(7) parser.
Needed as a preliminary for an upcoming bugfix.
No code change.

5 years agoRework previous: use getopt(3) to parse options passed to the worker process.
anton [Tue, 18 Dec 2018 21:32:21 +0000 (21:32 +0000)]
Rework previous: use getopt(3) to parse options passed to the worker process.

ok tedu@

5 years agosync
deraadt [Tue, 18 Dec 2018 21:29:45 +0000 (21:29 +0000)]
sync

5 years agoThe scripts just tests whether GENERATE_PIE_SCRIPT is set and ignores its
guenther [Tue, 18 Dec 2018 21:15:21 +0000 (21:15 +0000)]
The scripts just tests whether GENERATE_PIE_SCRIPT is set and ignores its
value, so setting it to 'no' was completely misleading

5 years agoGenerate PIE ldscripts on armv7, hppa, and sh, so that there are symbols
guenther [Tue, 18 Dec 2018 21:14:22 +0000 (21:14 +0000)]
Generate PIE ldscripts on armv7, hppa, and sh, so that there are symbols
for the start+end of .{preinit,init,fini}_array sections when building
PIE executables.

ok kettenis@

5 years agoDetection of MELTDOWN-proof Intel CPUs was broken: cpuid.07 has
guenther [Tue, 18 Dec 2018 21:11:09 +0000 (21:11 +0000)]
Detection of MELTDOWN-proof Intel CPUs was broken: cpuid.07 has
subleafs, so to get SEFF0EDX_ARCH_CAP we have to clear %ecx too.
While here, delete a redundant cpuid.01 invocation.

problem noted and testing by tedu@
ok mlarkin@ deraadt@

5 years ago"a" MIDI, not "an";
jmc [Tue, 18 Dec 2018 20:37:27 +0000 (20:37 +0000)]
"a" MIDI, not "an";

5 years agoMake mg kill a region if the 'delete' or 'backspace' keys are pressed
lum [Tue, 18 Dec 2018 20:35:34 +0000 (20:35 +0000)]
Make mg kill a region if the 'delete' or 'backspace' keys are pressed
and a region is selected.  The contents of the region are then placed
into the kill buffer. Like emacs.

5 years agoRework how socket fds are passed around internally. This will allow
tedu [Tue, 18 Dec 2018 20:34:32 +0000 (20:34 +0000)]
Rework how socket fds are passed around internally. This will allow
more flexibility in listening sockets (and fixes a bug related to inet6).
Everything is in arrays now instead of discrete variables.
ok anton

5 years agoFigure out the number of available CPUs using system fuse registers.
visa [Tue, 18 Dec 2018 14:24:02 +0000 (14:24 +0000)]
Figure out the number of available CPUs using system fuse registers.
This makes `ncpusfound' independent of kernel boot parameters.

The kernel still needs the help of the firmware to spin up secondary
CPUs, so the `coremask' or `numcores' boot parameter is still needed
for multicore operation.

Tested on CN5020, CN6120, CN7130 and CN7360.

5 years agoAccept DUID as a root disk specifier.
visa [Tue, 18 Dec 2018 13:44:11 +0000 (13:44 +0000)]
Accept DUID as a root disk specifier.

Example boot command:

bootoctlinux rootdev=e7f5137a2eb9a085 numcores=4

5 years agoPass window into mode functions.
nicm [Tue, 18 Dec 2018 13:20:44 +0000 (13:20 +0000)]
Pass window into mode functions.

5 years agoFix the IPL of pfkeyv2_mtx to prevent a deadlock. The system can use
visa [Tue, 18 Dec 2018 13:18:31 +0000 (13:18 +0000)]
Fix the IPL of pfkeyv2_mtx to prevent a deadlock. The system can use
the mutex with and without the kernel lock.

Prompted by WITNESS.

OK deraadt@ kettenis@

5 years agoWith option -l, show only UDP sockets that can receive packets from
benno [Tue, 18 Dec 2018 10:16:24 +0000 (10:16 +0000)]
With option -l, show only UDP sockets that can receive packets from
any other host, i.e. are somewhat like tcp sockets in LISTEN state.
Suggested by tedu@ asking about netstat output.
ok claudio@ tedu@

5 years agoshow log/reset/stop as single commands, like usage() currently does;
jmc [Tue, 18 Dec 2018 08:04:58 +0000 (08:04 +0000)]
show log/reset/stop as single commands, like usage() currently does;
ok mlarkin claudio

5 years agosync
tedu [Tue, 18 Dec 2018 04:25:28 +0000 (04:25 +0000)]
sync

5 years agoadd a wifi 9560 found in a new laptop. ok deraadt
tedu [Tue, 18 Dec 2018 04:25:16 +0000 (04:25 +0000)]
add a wifi 9560 found in a new laptop. ok deraadt

5 years agosync
kevlo [Tue, 18 Dec 2018 01:27:13 +0000 (01:27 +0000)]
sync

5 years agoAdd some devices found on Intel Leaf Hill CRB.
kevlo [Tue, 18 Dec 2018 01:26:07 +0000 (01:26 +0000)]
Add some devices found on Intel Leaf Hill CRB.

ok deraadt@

5 years agoHandle SIOCADDMULTI and SIOCDELMULTI as nops in ioctl code.
dlg [Mon, 17 Dec 2018 23:42:47 +0000 (23:42 +0000)]
Handle SIOCADDMULTI and SIOCDELMULTI as nops in ioctl code.

There's nothing underneath the tunnels that needs configuration,
so there's no point in keepign track of configured multicast
addresses. We will at least save a bit of memory.

5 years agoIf something like ether_ioctl returns ENETRESET, don't let it bubble out.
dlg [Mon, 17 Dec 2018 23:08:36 +0000 (23:08 +0000)]
If something like ether_ioctl returns ENETRESET, don't let it bubble out.

ENETRESET in hardware drivers means you should reprogram the hardware.
There's no hardware to reprogram, so just turn it into 0 on the way
out.