CVS: cvs.openbsd.org: src

2018-09-10 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/10 22:06:32

Modified files:
usr.sbin/vmd   : vioqcow2.c virtio.c 

Log message:
Fail fast when we are unable to determine disk format.

While here, minor cleanup on logging.



CVS: cvs.openbsd.org: src

2018-09-10 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/10 22:03:16

Modified files:
usr.sbin/vmctl : main.c vmctl.8 vmctl.c vmctl.h 

Log message:
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.



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 16:21:39

Modified files:
sys/netinet: in_pcb.c 

Log message:
Remove useless INPCBHASH() macros.  Just expand them.
OK stsp@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2018/09/10 14:53:53

Modified files:
sbin/pfctl : pfctl_parser.c 

Log message:
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



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 14:51:59

Modified files:
regress/usr.sbin/bgpd/unittests: Makefile rde_trie_test.1.out 
 rde_trie_test.2.out 
 rde_trie_test.3.out 
 rde_trie_test.c 

Log message:
check orlonger option of trie_match()



CVS: cvs.openbsd.org: src

2018-09-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2018/09/10 13:22:53

Modified files:
usr.sbin/rebound: rebound.c 

Log message:
logmsg(LOG_ERR) -> logerr(); ok tedu@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Gerhard Roth
CVSROOT:/cvs
Module name:src
Changes by: gerh...@cvs.openbsd.org 2018/09/10 11:00:45

Modified files:
sys/dev/usb: if_umb.c 

Log message:
Prevent a panic in umb(4) when roaming is diabled.

Found by beck@, tested and ok by bluhm@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexandr Nedvedicky
CVSROOT:/cvs
Module name:src
Changes by: sas...@cvs.openbsd.org  2018/09/10 10:18:34

Modified files:
sys/kern   : init_main.c 
sys/net: if.c if_var.h 
sys/sys: device.h 

Log message:
- 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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2018/09/10 10:17:48

Modified files:
sbin/pfctl : pfctl_parser.c 

Log message:
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



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 10:14:08

Modified files:
share/man/man9 : mbuf.9 
sys/kern   : uipc_mbuf.c 
sys/net: pf_norm.c 
sys/netinet: ip_input.c 
sys/netinet6   : frag6.c 
sys/nfs: krpc_subr.c nfs_socket.c 
sys/sys: mbuf.h 

Log message:
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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Henning Brauer
CVSROOT:/cvs
Module name:src
Changes by: henn...@cvs.openbsd.org 2018/09/10 10:07:20

Modified files:
sys/net: if.c 

Log message:
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



CVS: cvs.openbsd.org: src

2018-09-10 Thread Henning Brauer
CVSROOT:/cvs
Module name:src
Changes by: henn...@cvs.openbsd.org 2018/09/10 09:54:28

Modified files:
sys/net: pf_syncookies.c 

Log message:
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



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 08:29:19

Modified files:
regress/usr.sbin/bgpd/config: bgpd.conf.8.in bgpd.conf.8.ok 

Log message:
test all variations of network statements



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 08:20:25

Modified files:
regress/usr.sbin/bgpd/config: Makefile 
Added files:
regress/usr.sbin/bgpd/config: bgpd.conf.8.in bgpd.conf.8.ok 

Log message:
add a test for network statements with prefix-sets



CVS: cvs.openbsd.org: src

2018-09-10 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/09/10 07:52:37

Modified files:
share/man/man9 : mbuf.9 

Log message:
tweak previous;



CVS: cvs.openbsd.org: src

2018-09-10 Thread Ayaka Koshibe
CVSROOT:/cvs
Module name:src
Changes by: akosh...@cvs.openbsd.org2018/09/10 07:21:39

Modified files:
usr.sbin/switchd: proc.c proc.h switchd.c 

Log message:
Mirror bluhm's fixes for proc.c daemons to dup /dev/null for child processes
in switchd(8).

OK henning@ bluhm@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Denis Fondras
CVSROOT:/cvs
Module name:src
Changes by: de...@cvs.openbsd.org   2018/09/10 07:15:50

Modified files:
usr.sbin/bgpd  : rde_trie.c 

Log message:
fix typos

OK claudio@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 07:00:58

Modified files:
regress/sys/netinet/frag: Makefile 
regress/sys/netinet6/frag6: Makefile 
Added files:
regress/sys/netinet/frag: frag_queuelimit.py 
regress/sys/netinet6/frag6: frag6_queuelimit.py 

Log message:
Send many small fragments that exceed the pf reassembly queue limit.



CVS: cvs.openbsd.org: www

2018-09-10 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:www
Changes by: bent...@cvs.openbsd.org 2018/09/10 07:00:54

Modified files:
faq/ports  : specialtopics.html 

Log message:
Bring the rc script example up to date.



CVS: cvs.openbsd.org: www

2018-09-10 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:www
Changes by: bent...@cvs.openbsd.org 2018/09/10 06:58:03

Modified files:
faq/ports  : specialtopics.html 

Log message:
Remove the ossaudio and NetBSD/FreeBSD sound sections.
Using them is not such a great idea anymore.



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 06:47:02

Modified files:
share/man/man9 : mbuf.9 
sys/kern   : uipc_mbuf.c 
sys/net: pf_norm.c 
sys/netinet: ip_input.c 
sys/netinet6   : frag6.c 
sys/sys: mbuf.h 

Log message:
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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/09/10 06:42:17

Modified files:
usr.sbin/smtpd : smtpd.conf.5 

Log message:
tweak the table commands somewhat; ok gilles



CVS: cvs.openbsd.org: www

2018-09-10 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:www
Changes by: bent...@cvs.openbsd.org 2018/09/10 06:05:49

Modified files:
faq: upgrade59.html upgrade60.html upgrade61.html 
 upgrade62.html upgrade63.html 

Log message:
Add missing '#' from CSS markup.



CVS: cvs.openbsd.org: www

2018-09-10 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:www
Changes by: bent...@cvs.openbsd.org 2018/09/10 06:02:45

Modified files:
faq: upgrade62.html upgrade63.html 

Log message:
Add missing slashes from URL. Found with vnu.



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 05:37:26

Modified files:
sys/net: pf_norm.c pfvar.h 

Log message:
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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 05:09:25

Modified files:
usr.sbin/bgpd  : parse.y 

Log message:
use filterset_move() like all other network statements. It checks for
source == NULL, avoiding a possible crash introduced yesterday.
ok claudio@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2018/09/10 05:07:43

Modified files:
sys/net80211   : ieee80211_ioctl.c 

Log message:
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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 05:02:35

Modified files:
regress/usr.sbin/bgpd/config: bgpd.conf.1.ok bgpd.conf.2.ok 
  bgpd.conf.3.ok bgpd.conf.4.ok 
  bgpd.conf.5.ok bgpd.conf.6.ok 
  bgpd.conf.7.ok 

Log message:
update regression tests after previous commit. ok claudio@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/09/10 05:01:15

Modified files:
usr.sbin/bgpd  : bgpd.h printconf.c rde_sets.c 

Log message:
remove some empty lines from printconf output. ok claudio@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 04:39:26

Modified files:
usr.sbin/vmd   : vmd.c vmm.c 

Log message:
vmd(8) clould close file descriptor 0 as not all fd fields were
properly initialized with -1.  Also avoid closing -1.
OK mlarkin@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/09/10 04:36:01

Modified files:
usr.sbin/vmd   : proc.c proc.h vmd.c 

Log message:
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@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2018/09/10 04:11:18

Modified files:
sys/net80211   : ieee80211_node.c 

Log message:
fix typo in the length of the essid we want to switch to

found with and OK stsp@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2018/09/10 03:13:53

Modified files:
sys/net80211   : ieee80211_node.c 

Log message:
extract clearing WEP/WPA in ess into helper functions



CVS: cvs.openbsd.org: src

2018-09-10 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2018/09/10 03:10:36

Modified files:
etc/examples   : bgpd.conf 

Log message:
Adjust the config to -current bgpd which makes it a lot more readable.
OK phessler@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2018/09/10 02:27:13

Modified files:
sys/net80211   : ieee80211_ioctl.c 

Log message:
use the correct essid when switching during the ioctl path

pointed out by stsp@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2018/09/10 02:26:39

Modified files:
sys/net80211   : ieee80211_node.c ieee80211_var.h 

Log message:
give set_ess a len variable, so we can correctly match the essid we want
to switch to.

pointed out by stsp@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/09/10 00:48:01

Modified files:
usr.bin/tmux   : window-copy.c 

Log message:
Do not clear selection when searching.



CVS: cvs.openbsd.org: src

2018-09-10 Thread YASUOKA Masahiko
CVSROOT:/cvs
Module name:src
Changes by: yasu...@cvs.openbsd.org 2018/09/10 00:40:06

Modified files:
usr.sbin/pstat : pstat.c 

Log message:
Fix previous commit.  It mistakenly included a change for debug.