openbsd
6 years agoFix netmask regression in get_dynnode()
kn [Tue, 11 Sep 2018 10:42:10 +0000 (10:42 +0000)]
Fix netmask regression in get_dynnode()

I introduced this error with r1.330 while removing the af parameter from
unmask().

`pass inet from (lo0)/24' would result in `pass inet from (lo0)', sorry.

6 years agoNuke some trailing spaces that wandered into the
krw [Tue, 11 Sep 2018 10:23:40 +0000 (10:23 +0000)]
Nuke some trailing spaces that wandered into the
crosshairs.

6 years agoWith the interface debug flag enabled, print a "score" for each AP we
phessler [Tue, 11 Sep 2018 10:21:29 +0000 (10:21 +0000)]
With the interface debug flag enabled, print a "score" for each AP we
consider during auto-join.  This can help users determine why a specific
network was chosen.

OK stsp@

6 years agoadd the conflict info to what's stored in pkglocatedb, as it's meta-info
espie [Tue, 11 Sep 2018 09:43:08 +0000 (09:43 +0000)]
add the conflict info to what's stored in pkglocatedb, as it's meta-info
that's not readily available otherwise.

6 years agoFix --exclude-libs option. Based on code already committed upstream.
kettenis [Tue, 11 Sep 2018 09:25:56 +0000 (09:25 +0000)]
Fix --exclude-libs option.  Based on code already committed upstream.

tested by naddy@

6 years agoTighten validation tests on an obscure corner case of
krw [Tue, 11 Sep 2018 09:13:19 +0000 (09:13 +0000)]
Tighten validation tests on an obscure corner case of
trying to align partitions to size <= 0 or past the
end of the disk. Emit error message in this case as
in other align errors.

Looks good to otto@.

6 years agoRemove unused buffer from host()
kn [Tue, 11 Sep 2018 09:02:27 +0000 (09:02 +0000)]
Remove unused buffer from host()

Left-over from pre-host_ip() times. While here, use __func__.

OK henning benno

6 years agoadd files for test 4
benno [Tue, 11 Sep 2018 08:55:49 +0000 (08:55 +0000)]
add files for test 4

6 years ago- moving state look up outside of PF_LOCK()
sashan [Tue, 11 Sep 2018 07:53:38 +0000 (07:53 +0000)]
- moving state look up outside of PF_LOCK()

this change adds a pf_state_lock rw-lock, which protects consistency
of state table in PF. The code delivered in this change is guarded
by 'WITH_PF_LOCK', which is still undefined. People, who are willing
to experiment and want to run it must do two things:

- compile kernel with -DWITH_PF_LOCK
- bump NET_TASKQ from 1 to ... sky is the limit,
  (just select some sensible value for number of tasks your
  system is able to handle)

OK bluhm@

6 years agoAdd defines for amd microcode msrs which appear to be present since k8
jsg [Tue, 11 Sep 2018 07:13:23 +0000 (07:13 +0000)]
Add defines for amd microcode msrs which appear to be present since k8
though amd only provides public redistributable updates for >= family 10h.

6 years agoDo not check for mouse events on pane borders when zoomed, based on a
nicm [Tue, 11 Sep 2018 06:37:54 +0000 (06:37 +0000)]
Do not check for mouse events on pane borders when zoomed, based on a
fix from Avi Halachmi.

6 years agoFail fast when we are unable to determine disk format.
ccardenas [Tue, 11 Sep 2018 04:06:32 +0000 (04:06 +0000)]
Fail fast when we are unable to determine disk format.

While here, minor cleanup on logging.

6 years agoAdd ability to create qcow2 disk.
ccardenas [Tue, 11 Sep 2018 04:03:16 +0000 (04:03 +0000)]
Add ability to create qcow2 disk.

vmctl create now takes an optional disk format parameter: raw or qcow2.
If format is omitted, raw is used.

Many thanks to Ori Bernstein.

6 years agoRemove useless INPCBHASH() macros. Just expand them.
bluhm [Mon, 10 Sep 2018 22:21:39 +0000 (22:21 +0000)]
Remove useless INPCBHASH() macros.  Just expand them.
OK stsp@

6 years agoMerge host_v{4,6}() into simpler host_ip()
kn [Mon, 10 Sep 2018 20:53:53 +0000 (20:53 +0000)]
Merge host_v{4,6}() into simpler host_ip()

Except for networks such as "10/8" host_ip() now handles addresses in an
AF-agnostic way with more duplicate code removed/merged.

OK sashan (as for earlier copy_satopfaddr() diff) henning

6 years agocheck orlonger option of trie_match()
benno [Mon, 10 Sep 2018 20:51:59 +0000 (20:51 +0000)]
check orlonger option of trie_match()

6 years agologmsg(LOG_ERR) -> logerr(); ok tedu@
anton [Mon, 10 Sep 2018 19:22:53 +0000 (19:22 +0000)]
logmsg(LOG_ERR) -> logerr(); ok tedu@

6 years agoPrevent a panic in umb(4) when roaming is diabled.
gerhard [Mon, 10 Sep 2018 17:00:45 +0000 (17:00 +0000)]
Prevent a panic in umb(4) when roaming is diabled.

Found by beck@, tested and ok by bluhm@

6 years ago- if_cloners list populated at boot time only then becomes immutable,
sashan [Mon, 10 Sep 2018 16:18:34 +0000 (16:18 +0000)]
- if_cloners list populated at boot time only then becomes immutable,
  so we can let go if_cloners_lock.

OK tb@, claudio@, bluhm@, kn@, henning@

6 years agoIntroduce copy_satopfaddr()
kn [Mon, 10 Sep 2018 16:17:48 +0000 (16:17 +0000)]
Introduce copy_satopfaddr()

Move the same dance around v4/v6 for copying IP addresses from sockaddr
into pf_addr to avoid duplicate code and improve readability.

Feedback and OK bluhm

6 years agoInstead of calculating the mbuf packet header length here and there,
bluhm [Mon, 10 Sep 2018 16:14:07 +0000 (16:14 +0000)]
Instead of calculating the mbuf packet header length here and there,
put the algorithm into a new function m_calchdrlen().  Also set an
uninitialized m_len to 0 in NFS code.
OK claudio@

6 years agoif_setrdomain could potentially call if_clone_create recursively in the create
henning [Mon, 10 Sep 2018 16:07:20 +0000 (16:07 +0000)]
if_setrdomain could potentially call if_clone_create recursively in the create
rdomain case leading to locking issues and lots of headscratching. turns out
the only case where if_setrdomain could actually create an rdomain and thus
end up with that pattern is the ioctl path.
make if_setrdomain never create an rdomain, return error if it doesn't exist
already, introduce if_createrdomain, and adjust the ioctl path to use it.
ok sashan bluhm claudio

6 years agoin pf_syncookie_validate, return early if we don't have syncookies in
henning [Mon, 10 Sep 2018 15:54:28 +0000 (15:54 +0000)]
in pf_syncookie_validate, return early if we don't have syncookies in
flight that can possibly match. there is a tiny but existing chance that
a sequence number matches w/ our hash and we'd end up dropping traffic.
unclear whether that has actually happened since the report chain is long :)
report via haesbert via bluhm; ok bluhm

6 years agotest all variations of network statements
benno [Mon, 10 Sep 2018 14:29:19 +0000 (14:29 +0000)]
test all variations of network statements

6 years agoadd a test for network statements with prefix-sets
benno [Mon, 10 Sep 2018 14:20:25 +0000 (14:20 +0000)]
add a test for network statements with prefix-sets

6 years agotweak previous;
jmc [Mon, 10 Sep 2018 13:52:37 +0000 (13:52 +0000)]
tweak previous;

6 years agoMirror bluhm's fixes for proc.c daemons to dup /dev/null for child processes
akoshibe [Mon, 10 Sep 2018 13:21:39 +0000 (13:21 +0000)]
Mirror bluhm's fixes for proc.c daemons to dup /dev/null for child processes
in switchd(8).

OK henning@ bluhm@

6 years agofix typos
denis [Mon, 10 Sep 2018 13:15:50 +0000 (13:15 +0000)]
fix typos

OK claudio@

6 years agoSend many small fragments that exceed the pf reassembly queue limit.
bluhm [Mon, 10 Sep 2018 13:00:58 +0000 (13:00 +0000)]
Send many small fragments that exceed the pf reassembly queue limit.

6 years agoDuring fragment reassembly, mbuf chains with packet headers were
bluhm [Mon, 10 Sep 2018 12:47:02 +0000 (12:47 +0000)]
During fragment reassembly, mbuf chains with packet headers were
created.  Add a new function m_removehdr() do convert packet header
mbufs within the chain to regular mbufs.  Assert that the mbuf at
the beginning of the chain has a packet header.
found by Maxime Villard in NetBSD; from markus@; OK claudio@

6 years agotweak the table commands somewhat; ok gilles
jmc [Mon, 10 Sep 2018 12:42:17 +0000 (12:42 +0000)]
tweak the table commands somewhat; ok gilles

6 years agoLimit the fragment entry queue length to 64 per bucket. So we have
bluhm [Mon, 10 Sep 2018 11:37:26 +0000 (11:37 +0000)]
Limit the fragment entry queue length to 64 per bucket.  So we have
a global limit of 1024 fragments, but it is fine grained to the
region of the packet.  Smaller packets may have less fragments.
This costs another 16 bytes of memory per reassembly and devides
the worst case for searching by 8.
requestd by claudio@; OK sashan@ claudio@

6 years agouse filterset_move() like all other network statements. It checks for
benno [Mon, 10 Sep 2018 11:09:25 +0000 (11:09 +0000)]
use filterset_move() like all other network statements. It checks for
source == NULL, avoiding a possible crash introduced yesterday.
ok claudio@

6 years agodo not immediately set the join'd network, the join command only updates
phessler [Mon, 10 Sep 2018 11:07:43 +0000 (11:07 +0000)]
do not immediately set the join'd network, the join command only updates
the list.

makes /etc/netstart very fast when ran while the interface is up

OK stsp@

6 years agoupdate regression tests after previous commit. ok claudio@
benno [Mon, 10 Sep 2018 11:02:35 +0000 (11:02 +0000)]
update regression tests after previous commit. ok claudio@

6 years agoremove some empty lines from printconf output. ok claudio@
benno [Mon, 10 Sep 2018 11:01:15 +0000 (11:01 +0000)]
remove some empty lines from printconf output. ok claudio@

6 years agovmd(8) clould close file descriptor 0 as not all fd fields were
bluhm [Mon, 10 Sep 2018 10:39:26 +0000 (10:39 +0000)]
vmd(8) clould close file descriptor 0 as not all fd fields were
properly initialized with -1.  Also avoid closing -1.
OK mlarkin@

6 years agoDuring the fork+exec implementation, daemon(3) was moved after
bluhm [Mon, 10 Sep 2018 10:36:01 +0000 (10:36 +0000)]
During the fork+exec implementation, daemon(3) was moved after
proc_init().  As a consequence vmd(8) child processes did not detach
from the terminal anymore.  Dup /dev/null to the stdio file descriptors
in the children.
OK mlarkin@ reyk@

6 years agofix typo in the length of the essid we want to switch to
phessler [Mon, 10 Sep 2018 10:11:18 +0000 (10:11 +0000)]
fix typo in the length of the essid we want to switch to

found with and OK stsp@

6 years agoextract clearing WEP/WPA in ess into helper functions
phessler [Mon, 10 Sep 2018 09:13:53 +0000 (09:13 +0000)]
extract clearing WEP/WPA in ess into helper functions

6 years agoAdjust the config to -current bgpd which makes it a lot more readable.
claudio [Mon, 10 Sep 2018 09:10:36 +0000 (09:10 +0000)]
Adjust the config to -current bgpd which makes it a lot more readable.
OK phessler@

6 years agouse the correct essid when switching during the ioctl path
phessler [Mon, 10 Sep 2018 08:27:13 +0000 (08:27 +0000)]
use the correct essid when switching during the ioctl path

pointed out by stsp@

6 years agogive set_ess a len variable, so we can correctly match the essid we want
phessler [Mon, 10 Sep 2018 08:26:39 +0000 (08:26 +0000)]
give set_ess a len variable, so we can correctly match the essid we want
to switch to.

pointed out by stsp@

6 years agoDo not clear selection when searching.
nicm [Mon, 10 Sep 2018 06:48:01 +0000 (06:48 +0000)]
Do not clear selection when searching.

6 years agoFix previous commit. It mistakenly included a change for debug.
yasuoka [Mon, 10 Sep 2018 06:40:06 +0000 (06:40 +0000)]
Fix previous commit.  It mistakenly included a change for debug.

6 years agoput the port into autonegotiate mode on attach, since that's the default
jmatthew [Mon, 10 Sep 2018 04:59:32 +0000 (04:59 +0000)]
put the port into autonegotiate mode on attach, since that's the default
media setting.

tested by and ok ccardenas@

6 years agoif the adapter can't determine the phy type on a port, pretend it's baseCR
jmatthew [Mon, 10 Sep 2018 04:56:13 +0000 (04:56 +0000)]
if the adapter can't determine the phy type on a port, pretend it's baseCR
so we get a usable list of media types to pick from.

tested by and ok ccardenas@

6 years agobit rates over 2G won't fit in an int, so use uint64_ts instead
jmatthew [Mon, 10 Sep 2018 04:52:23 +0000 (04:52 +0000)]
bit rates over 2G won't fit in an int, so use uint64_ts instead

6 years agopmap_activate() should match cpu_switchto, so set up ci_{kern,user}_cr3
guenther [Sun, 9 Sep 2018 22:46:54 +0000 (22:46 +0000)]
pmap_activate() should match cpu_switchto, so set up ci_{kern,user}_cr3
if activating for the current thread and meltdown mitigations are in effect.
Not clear if it's actually possible to hit the case where this matters,
but it's the Right Thing.

ok mlarkin@

6 years agoSimplify pmap_is_curpmap(): %cr3 can never match pm_pdirpa_intel here
guenther [Sun, 9 Sep 2018 22:41:57 +0000 (22:41 +0000)]
Simplify pmap_is_curpmap(): %cr3 can never match pm_pdirpa_intel here
as this code isn't present in those page tables

ok mlarkin@

6 years agoCalculate automatically the padding necessary for lining up the
guenther [Sun, 9 Sep 2018 22:09:36 +0000 (22:09 +0000)]
Calculate automatically the padding necessary for lining up the
iretq instruction used when Meltdown mitigation is effect.  It got
pushed off when an lfence was added in locore.S rev 1.107, resulting
in two signals being sent instead of one when iretq faulted, and
neither signal had the correct sigcontext info.  Update the makefile
rule for locore.o to verify that things are correct.

ok mlarkin@

6 years agoTeach binutils how to assemble INVPCID and how to disassemble
guenther [Sun, 9 Sep 2018 21:59:43 +0000 (21:59 +0000)]
Teach binutils how to assemble INVPCID and how to disassemble
INV{EPT,VPID,PCID}

ok mlarkin@

6 years agomerge in some missed bits from 1.7.0 to simplify update prep.
sthen [Sun, 9 Sep 2018 21:32:59 +0000 (21:32 +0000)]
merge in some missed bits from 1.7.0 to simplify update prep.

6 years agomerge in some missed bits from 1.7.0 to simplify update prep.
sthen [Sun, 9 Sep 2018 21:30:24 +0000 (21:30 +0000)]
merge in some missed bits from 1.7.0 to simplify update prep.
(I think we actually had slightly beyond 1.7.0, I've left code bits but
there are some SSL->TLS changes which go away with this and will come back
with the update).

6 years agoDuring the fork+exec implementation, daemon(3) was moved after
bluhm [Sun, 9 Sep 2018 21:06:51 +0000 (21:06 +0000)]
During the fork+exec implementation, daemon(3) was moved after
proc_init().  As a consequence httpd(8) and relayd(8) child processes
did not detach from the terminal anymore.  Dup /dev/null to the
stdio file descriptors in the children.
OK benno@

6 years agoEnable the empty as-set and prefix-set tests since that is now allowed again
claudio [Sun, 9 Sep 2018 20:41:01 +0000 (20:41 +0000)]
Enable the empty as-set and prefix-set tests since that is now allowed again

6 years agoAllow for empty as-set and prefix-set definitions by adding explicit rules
claudio [Sun, 9 Sep 2018 20:39:09 +0000 (20:39 +0000)]
Allow for empty as-set and prefix-set definitions by adding explicit rules
for those because shift/reduce issues in the list with optional commas.
OK benno@

6 years agoconvert the things we save in 'join' into a single ioctl. mixing related
phessler [Sun, 9 Sep 2018 20:32:55 +0000 (20:32 +0000)]
convert the things we save in 'join' into a single ioctl.  mixing related
settings over multiple calls was risky and racy.  Pass essid, wpa, and wep
paramaters in a single ioctl and process it atomically.

no change for 'nwid' users

OK stsp@ benno@

6 years agomissing Xc;
jmc [Sun, 9 Sep 2018 17:11:26 +0000 (17:11 +0000)]
missing Xc;

6 years agoApply retguard to the last asm functions in the arm64 kernel. This completes
mortimer [Sun, 9 Sep 2018 16:41:43 +0000 (16:41 +0000)]
Apply retguard to the last asm functions in the arm64 kernel. This completes
retguard in the kernel and brings the number of useful ROP gadgets at
runtime to zero.

ok kettenis@

6 years agoShut up a gcc warning about uninitialized use of min & max by adding a default
claudio [Sun, 9 Sep 2018 15:04:36 +0000 (15:04 +0000)]
Shut up a gcc warning about uninitialized use of min & max by adding a default
case in the switch statement. Found by denis@ and fix proposed by sthen@

6 years agouse rib_valid() to check if a rib is useable. ok claudio@
benno [Sun, 9 Sep 2018 15:02:26 +0000 (15:02 +0000)]
use rib_valid() to check if a rib is useable. ok claudio@

6 years agoComment the empty as-set and prefix-set tests. This is not yet working.
claudio [Sun, 9 Sep 2018 14:28:50 +0000 (14:28 +0000)]
Comment the empty as-set and prefix-set tests. This is not yet working.
Add a single asnum test, just to make sure that works as well

6 years agoCan not allow empty as-set and prefix-set blocks right now. This produces
claudio [Sun, 9 Sep 2018 14:27:24 +0000 (14:27 +0000)]
Can not allow empty as-set and prefix-set blocks right now. This produces
shit/reduce confilcts which need to be resolved first.

6 years agoMake switchd(8) ignore PACKET_INs generated from looped traffic. Currently,
akoshibe [Sun, 9 Sep 2018 14:21:32 +0000 (14:21 +0000)]
Make switchd(8) ignore PACKET_INs generated from looped traffic. Currently,
it responds to these messages with an invalid PACKET_OUT onto OFP*_PORT_ANY,
resulting in the switch responding with an error, causing switchd to
disconnect the switch.

OK phessler@ claudio@

6 years agouse TAILQ_CONCAT in filterset_move(). ok claudio@
benno [Sun, 9 Sep 2018 14:08:11 +0000 (14:08 +0000)]
use TAILQ_CONCAT in filterset_move(). ok claudio@

6 years agoFix a crash in rdistd triggered by the recent getpw{ent,nam,uid}
millert [Sun, 9 Sep 2018 13:53:11 +0000 (13:53 +0000)]
Fix a crash in rdistd triggered by the recent getpw{ent,nam,uid}
changes.  This stems from rdist stashing a pointer to the static
area used by getpw{ent,nam,uid} and using it to avoid repeating
passwd lookups when pw->pw_name matches the user to be looked up.

This relied on undefined behavior, and with the recent passwd
changes, is no longer possible as the old pointer will be invalidated.
A better approach is to use the upcoming uid_from_user(3) functions.
Found by and fix OK tim@

6 years agoRemove another optnl. In general we no longer support a newline between
claudio [Sun, 9 Sep 2018 13:44:54 +0000 (13:44 +0000)]
Remove another optnl. In general we no longer support a newline between
the keyword and "{". In this case it is 'set {'.
Newlines afterwards are accepted.

6 years agoBad merge, change a optnl to comma since that is what we want there.
claudio [Sun, 9 Sep 2018 13:32:05 +0000 (13:32 +0000)]
Bad merge, change a optnl to comma since that is what we want there.

6 years agoEnable all the #notyet tests since the parser supports those now
claudio [Sun, 9 Sep 2018 13:31:10 +0000 (13:31 +0000)]
Enable all the #notyet tests since the parser supports those now

6 years agoprefix-set printing was adjusted in last commit. Adjust test.
claudio [Sun, 9 Sep 2018 13:25:12 +0000 (13:25 +0000)]
prefix-set printing was adjusted in last commit. Adjust test.

6 years agoRework the parser a bit to be more sane when it comes to newline and comma
claudio [Sun, 9 Sep 2018 13:22:41 +0000 (13:22 +0000)]
Rework the parser a bit to be more sane when it comes to newline and comma
handling. In expansion lists we want that commas and newlines are allowed
but optional. In the neighbor, group and rdomain blocks statements need to
be newline separated but neighbor 192.0.2.3 { descr "test-peer" } is allowed.
OK sthen@ benno@

6 years agoWrite asset as as_set since the other word is already used in English.
claudio [Sun, 9 Sep 2018 13:06:42 +0000 (13:06 +0000)]
Write asset as as_set since the other word is already used in English.
benno@ agrees, OK compiler

6 years agoFixup regress test after the last burst of commits by benno@
claudio [Sun, 9 Sep 2018 12:58:04 +0000 (12:58 +0000)]
Fixup regress test after the last burst of commits by benno@

6 years agosync header line with whats actually in the output.
benno [Sun, 9 Sep 2018 12:53:41 +0000 (12:53 +0000)]
sync header line with whats actually in the output.
ok claudio@

6 years agoMake it clear what 'dynamically added' prefixes are.
benno [Sun, 9 Sep 2018 12:53:00 +0000 (12:53 +0000)]
Make it clear what 'dynamically added' prefixes are.
Say that adding a prefix will overwrite an existing (equal) prefix.
ok claudio@

6 years agoupdate example bgpd.conf to use new config language features:
benno [Sun, 9 Sep 2018 12:49:44 +0000 (12:49 +0000)]
update example bgpd.conf to use new config language features:
network prefix-set ... and filters with prefix-set ... or-longer.
ok claudio@

6 years agoFixup unit test after change to trie_match (or-longer case)
claudio [Sun, 9 Sep 2018 12:39:51 +0000 (12:39 +0000)]
Fixup unit test after change to trie_match (or-longer case)

6 years agoClean up prefix flag handling. First of all the dynamic networks no longer
claudio [Sun, 9 Sep 2018 12:33:51 +0000 (12:33 +0000)]
Clean up prefix flag handling. First of all the dynamic networks no longer
need this and are now treated equally to the network statement in the config.
This makes bgpctl network delete <net> also remove a network which was defined
in the config.
While there remove the other use of flag which was done to support Adj-RIB-Out
but the direction we're taking is no longer needing that. Makes code simpler
again.
OK benno@

6 years agoAdd network prefix-set <name> syntax to announce networks in a prefix-set.
benno [Sun, 9 Sep 2018 11:00:51 +0000 (11:00 +0000)]
Add network prefix-set <name> syntax to announce networks in a prefix-set.
feature discussed with deraadt@ and job@, ok claudio@

6 years agordomains can be deleted again - remove caveat, tell ppl how to delete, and
henning [Sun, 9 Sep 2018 10:13:21 +0000 (10:13 +0000)]
rdomains can be deleted again - remove caveat, tell ppl how to delete, and
show an example. reminded by kn

6 years agoallow the automatically created loopback interfaces in rdomains to be
henning [Sun, 9 Sep 2018 10:11:41 +0000 (10:11 +0000)]
allow the automatically created loopback interfaces in rdomains to be
deleted if the rdomain doesn't contain any other interface. turn the rdomain
back into an ordinary, empty rtable in that case.
with this and the previous commits one can get rid of rdomains again without
rebooting, which wasn't possible any more for some time
ok bluhm, input mpi

6 years agoif_setrdomain: allow empty rtables to be turned into rdomains, not just
henning [Sun, 9 Sep 2018 10:09:06 +0000 (10:09 +0000)]
if_setrdomain: allow empty rtables to be turned into rdomains, not just
nonexistant ones as before. nasty error handling with bluhm, feedback mpi as
well. ok bluhm

6 years agoprovide rtable_empty(), returns 1 if the rtable doesn't contain any routes
henning [Sun, 9 Sep 2018 10:07:38 +0000 (10:07 +0000)]
provide rtable_empty(), returns 1 if the rtable doesn't contain any routes
ok bluhm

6 years agotweak previous;
jmc [Sun, 9 Sep 2018 06:36:43 +0000 (06:36 +0000)]
tweak previous;

6 years agoAdd disk format tests.
ccardenas [Sun, 9 Sep 2018 04:25:32 +0000 (04:25 +0000)]
Add disk format tests.

Thanks to Ori Bernstein.

6 years agoAdd tests for disk format.
ccardenas [Sun, 9 Sep 2018 04:11:55 +0000 (04:11 +0000)]
Add tests for disk format.

Thanks to Ori Bernstein.

6 years agoAdd initial qcow2 image support.
ccardenas [Sun, 9 Sep 2018 04:09:32 +0000 (04:09 +0000)]
Add initial qcow2 image support.

Users are able to declare disk images as 'raw' or 'qcow2' using either
vmctl and vm.conf.  The default disk image format is 'raw' if not specified.

Examples of using disk format:

vmctl start bsd -Lc -r cd64.iso -d qcow2:current.qc2
or
vmctl start bsd -Lc -r cd64.iso -d raw:current.raw
is equivalent to
vmctl start bsd -Lc -r cd64.iso -d current.raw

in vm.conf
vm "current" {
    disable
    memory 2G
    disk "/home/user/vmm/current.qc2" format "qcow2"
    interface { switch "external" }
}

or

vm "current" {
    disable
    memory 2G
    disk "/home/user/vmm/current.raw" format "raw"
    interface { switch "external" }
}

is equivlanet to

vm "current" {
    disable
    memory 2G
    disk "/home/user/vmm/current.raw"
    interface { switch "external" }
}

Tested by many.

Big Thanks to Ori Bernstein.

6 years agoBump NMBCLUSTERS to a more reasonable 256MB instead of the tiny 4MB.
claudio [Sat, 8 Sep 2018 20:12:54 +0000 (20:12 +0000)]
Bump NMBCLUSTERS to a more reasonable 256MB instead of the tiny 4MB.
May help ports builders to not run out of memory.
Lots of agreement and OK n2k18@

6 years agomissing Ed;
jmc [Sat, 8 Sep 2018 15:54:41 +0000 (15:54 +0000)]
missing Ed;

6 years agoimplement or-longer filter op for prefix-sets. Allows one two write rules like
benno [Sat, 8 Sep 2018 15:25:27 +0000 (15:25 +0000)]
implement or-longer filter op for prefix-sets. Allows one two write rules like
  deny from any prefix-set mynetworks or-longer
ok claudio, feature discussed with job and deraadt

6 years agoEnforce that "join" and "nwid" may not be used at the same time.
phessler [Sat, 8 Sep 2018 15:21:03 +0000 (15:21 +0000)]
Enforce that "join" and "nwid" may not be used at the same time.

OK stsp@

6 years agoAllocate path only when needed, use __func__
kn [Sat, 8 Sep 2018 14:45:55 +0000 (14:45 +0000)]
Allocate path only when needed, use __func__

6 years agoRemove now unused code for EVP_CIPH_FLAG_AEAD_CIPHER and EVP_CIPH_GCM_MODE.
jsing [Sat, 8 Sep 2018 14:39:41 +0000 (14:39 +0000)]
Remove now unused code for EVP_CIPH_FLAG_AEAD_CIPHER and EVP_CIPH_GCM_MODE.

ok inoguchi@ tb@

6 years agoSSL_MAX_DIGEST is no longer needed.
jsing [Sat, 8 Sep 2018 14:29:52 +0000 (14:29 +0000)]
SSL_MAX_DIGEST is no longer needed.

6 years agoError out early on bad anchor usage
kn [Sat, 8 Sep 2018 14:12:57 +0000 (14:12 +0000)]
Error out early on bad anchor usage

`pfctl -a foo' would do nothing with the non-existent anchor and exit 0.
This implements behaviour as documented in pfctl(8):

-a anchor
    Apply flags -f, -F, and -s only to the rules in the specified
    anchor.

While here, hoist a duplicate "_" check by using the more mnemonic `mode'.

OK henning sashan

6 years agoASN1_OBJECTs should be freed with ASN1_OBJECT_free(3), not with free(3).
tb [Sat, 8 Sep 2018 13:49:26 +0000 (13:49 +0000)]
ASN1_OBJECTs should be freed with ASN1_OBJECT_free(3), not with free(3).

ok inoguchi, jsing

6 years agoCheck for malloc() failures.
anton [Sat, 8 Sep 2018 13:17:19 +0000 (13:17 +0000)]
Check for malloc() failures.

Initial diff from Clemens Goessnitzer on tech@

Feedback and ok tb@

6 years agoSplit the pf(4) fragment reassembly queue into smaller parts.
bluhm [Sat, 8 Sep 2018 13:16:58 +0000 (13:16 +0000)]
Split the pf(4) fragment reassembly queue into smaller parts.
Remember 16 entry points based on the fragment offset.  Instead of
a worst case of 8196 list traversals we now check a maximum of 512
list entries or 16 array elements.
discussed with claudio@ and sashan@; OK sashan@

6 years agoRegress tests for as-set and prefix-set blocks
claudio [Sat, 8 Sep 2018 13:10:55 +0000 (13:10 +0000)]
Regress tests for as-set and prefix-set blocks