Re: route(8) example for "out of prefix" default gateway

2022-11-09 Thread Florian Obser
OK florian On 9 November 2022 07:37:50 GMT, Stuart Henderson wrote: >Seems some hosting providers have annoying "out of prefix" >default gateways whuch are painful to configure >(https://marc.info/?t=16678224225=1=2), should >we give a pointer in route(8)? > >Index: route.8

Re: mg: handle prefix argument in shell-command{,-on-region}

2022-11-09 Thread Omar Polo
bump On 2022/10/25 14:30:51 +0200, Omar Polo wrote: > On 2022/10/13 12:25:00 +0200, Omar Polo wrote: > > shell-command (M-!) and shell-command-on-region (M-|) works by > > displaying the output of the command in a new buffer, but in emacs > > using a prefix argument (C-u) allows to operate on

Push kernel lock into SIOCSIFGATTR

2022-11-09 Thread Klemens Nanni
The global group list keeps being protected by the net lock, but calling into netinet/ip_carp.c:carp_ifgattr_ioctl() still needs the big lock. Only carp(4) uses group attributes, so this unlocks just a small part of if_setgroupattribs(), but it also clarifies what is locked and why. Feedback?

apm garbage stack value could be accessed

2022-11-09 Thread Moritz Buhl
Hi tech, In case send or recv fail in send_command, reply.error is stack garbage. This wouldn't be possible if reply was zeroed. But checking for ret == 0 ensures that reply was fully written. OK? mbuhl Index: usr.sbin/apm/apm.c

acme-client memory leak in error case

2022-11-09 Thread Moritz Buhl
Hi tech, g is not freed in this error case. Found by codechecker. OK? mbuhl Index: usr.sbin/acme-client/netproc.c === RCS file: /cvs/src/usr.sbin/acme-client/netproc.c,v retrieving revision 1.31 diff -u -p -r1.31 netproc.c ---

adding a mutex to pf_state

2022-11-09 Thread Alexandr Nedvedicky
hello, diff below adds a mutex to pf_state. It fixes a NULL pointer dereference panic reported by Hrvoje sometime ago [1]. Besides adding a mutex to state the diff addresses a race between pfsync and state purge thread. What happened in this particular case was that state expired and its state

rpki-client: error out if too many ipAddrBlocks in ROA payload

2022-11-09 Thread Job Snijders
Hi all, The ASN.1 profile in draft-ietf-sidrops-rfc6482bis section 4 https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rfc6482bis-01 specifies that there must not be more than 2 ipAddrBlocks (one for IPv4, and one for IPv6). This changeset enforces that constraint. Compatible with all

Re: rpki-client: error out if too many ipAddrBlocks in ROA payload

2022-11-09 Thread Theo Buehler
On Wed, Nov 09, 2022 at 06:07:47PM +, Job Snijders wrote: > Hi all, > > The ASN.1 profile in draft-ietf-sidrops-rfc6482bis section 4 > https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rfc6482bis-01 > specifies that there must not be more than 2 ipAddrBlocks (one for IPv4, > and one

Re: i386: switch to clockintr(9)

2022-11-09 Thread Scott Cheloha
On Sun, Nov 06, 2022 at 07:46:37PM +, Scott Cheloha wrote: > This patch switches i386 to clockintr(9). > > I have tested this on my Lenovo X1 Carbon 6th and Dell Optiplex 7070 > running in 32-bit compatibility mode. It has survived ~20 parallel > release builds and upgrades from the

Re: install.sub: fix softraid disks not being created before md_installboot()

2022-11-09 Thread Klemens Nanni
On Wed, Nov 09, 2022 at 02:36:57PM +, ssnf wrote: > My softraid keydisk did not get initialized during the install process. > This fixes it. You need to be more specific, installing to a softraid volume has always required manual steps, so I have no idea what you did (not) do and when.

ftp: allow for more spaces in http headers

2022-11-09 Thread Claudio Jeker
This is the changes that I added to rpki-client http.c which I have not yet merged into ftp(1) This is rev 1.67 of http.c: date: 2022/09/08 13:52:36; author: claudio; state: Exp; lines: +6 -4; commitid: lZD6EB9xp7I5lQCo; In http_get_line() additionally strip any trailing space or tab from

ftp: strnvis redirect uri

2022-11-09 Thread Claudio Jeker
The redirect URI is untrusted input so strnvis it first before printing it. -- :wq Claudio Index: fetch.c === RCS file: /cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.210 diff -u -p -r1.210 fetch.c --- fetch.c 15 Sep 2022

Re: route(8) example for "out of prefix" default gateway

2022-11-09 Thread Claudio Jeker
On Wed, Nov 09, 2022 at 07:37:50AM +, Stuart Henderson wrote: > Seems some hosting providers have annoying "out of prefix" > default gateways whuch are painful to configure > (https://marc.info/?t=16678224225=1=2), should > we give a pointer in route(8)? > > Index: route.8 >

Re: route(8) example for "out of prefix" default gateway

2022-11-09 Thread Theo de Raadt
Claudio Jeker wrote: > On Wed, Nov 09, 2022 at 07:37:50AM +, Stuart Henderson wrote: > > Seems some hosting providers have annoying "out of prefix" > > default gateways whuch are painful to configure > > (https://marc.info/?t=16678224225=1=2), should > > we give a pointer in route(8)? >

Unlock SIOCGIFCONF

2022-11-09 Thread Klemens Nanni
As netintro(4) explains, this copies a bunch of data from the global interface list its per-interface address lists. All of this is never written to by ifconf(), protected by the net lock and documented as such in the struct comments already. Feedback? OK? diff --git a/sys/net/if.c

Re: pause.3: misc cleanup

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:47:22 +, Scott Cheloha wrote: > I think this could use some sprucing. > > NAME > > - "stop until signal" -> "wait for a signal" > > Feels more natural to me. OK > DESCRIPTION > > - It's "the calling thread" that blocks, not "a process". > > - Nothing is "forced". >

install.sub: fix softraid disks not being created before md_installboot()

2022-11-09 Thread ssnf
My softraid keydisk did not get initialized during the install process. This fixes it. Index: install.sub === RCS file: /cvs/src/distrib/miniroot/install.sub,v retrieving revision 1.1214 diff -r1.1214 install.sub 2875c2875 <

Re: netstart: do not try to create physical interfaces

2022-11-09 Thread Klemens Nanni
On Tue, Nov 01, 2022 at 01:57:21PM +, Klemens Nanni wrote: > vifscreate() is used to create all virtual interfaces up-front and is > always called at the beginning of netstart, whether an explicit list of > interfaces is passed or none, i.e. all are to be configured. > > Yet, to check the

Re: pppx(4): decrease netlock pressure in pppxioctl()

2022-11-09 Thread Vitaliy Makkoveev
ping... On Tue, Nov 01, 2022 at 03:16:02PM +0300, Vitaliy Makkoveev wrote: > Push netlock down to pppx_add_session(). The 'pppx_if' structure has > the `pxi_ready' member to prevent access to incomplete `pxi', so we > don't need to hold netlock during all initialisation process. This > removes

Re: pause.3: Use Fn

2022-11-09 Thread Jason McIntyre
On Tue, Nov 08, 2022 at 04:35:33PM -0500, Josiah Frentsos wrote: > Index: pause.3 > === > RCS file: /cvs/src/lib/libc/gen/pause.3,v > retrieving revision 1.15 > diff -u -p -r1.15 pause.3 > --- pause.3 2 Aug 2022 01:23:23 -

Re: ftp: allow for more spaces in http headers

2022-11-09 Thread Theo Buehler
On Wed, Nov 09, 2022 at 04:21:46PM +0100, Claudio Jeker wrote: > This is the changes that I added to rpki-client http.c which I have not > yet merged into ftp(1) ok tb

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 17:33:54 +0100, Claudio Jeker wrote: > Like this? Yes, OK millert@ - todd

Re: ftp: strnvis redirect uri

2022-11-09 Thread Klemens Nanni
On Wed, Nov 09, 2022 at 04:34:20PM +0100, Claudio Jeker wrote: > The redirect URI is untrusted input so strnvis it first before printing > it. OK kn > > -- > :wq Claudio > > Index: fetch.c > === > RCS file:

Re: ftp: strnvis redirect uri

2022-11-09 Thread Claudio Jeker
On Wed, Nov 09, 2022 at 08:51:21AM -0700, Todd C. Miller wrote: > On Wed, 09 Nov 2022 15:46:06 +, Florian Obser wrote: > > > 200 might be a bit short for an URL, no? > > Perhaps stravis(3) is a better choice then? > Like this? -- :wq Claudio Index: fetch.c

Unlock SIOCGIFG{MEMB,ATTR,LIST}

2022-11-09 Thread Klemens Nanni
See "Document global interface group list locking" on tech@ --- The global interface group list is also protected by the net lock and all access to it (all within if.c) take it accordingly. Getting all - membersof a group (SIOCGIFGMEMB), - attributes of a group (SIOCGIFGATTR), - groups

Re: ftp: strnvis redirect uri

2022-11-09 Thread Florian Obser
200 might be a bit short for an URL, no? On 2022-11-09 16:34 +01, Claudio Jeker wrote: > The redirect URI is untrusted input so strnvis it first before printing > it. > > -- > :wq Claudio > > Index: fetch.c > === > RCS file:

Re: ftp: strnvis redirect uri

2022-11-09 Thread Klemens Nanni
On Wed, Nov 09, 2022 at 05:33:54PM +0100, Claudio Jeker wrote: > On Wed, Nov 09, 2022 at 08:51:21AM -0700, Todd C. Miller wrote: > > On Wed, 09 Nov 2022 15:46:06 +, Florian Obser wrote: > > > > > 200 might be a bit short for an URL, no? > > > > Perhaps stravis(3) is a better choice then? > >

pause.3: misc cleanup

2022-11-09 Thread Scott Cheloha
I think this could use some sprucing. NAME - "stop until signal" -> "wait for a signal" Feels more natural to me. DESCRIPTION - It's "the calling thread" that blocks, not "a process". - Nothing is "forced". - It "blocks", it doesn't "pause". Saying pause(3) "pauses" is too circular. -

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:34:20 +0100, Claudio Jeker wrote: > The redirect URI is untrusted input so strnvis it first before printing > it. OK millert@ - todd

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 15:46:06 +, Florian Obser wrote: > 200 might be a bit short for an URL, no? Perhaps stravis(3) is a better choice then? - todd

Re: ftp: allow for more spaces in http headers

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:21:46 +0100, Claudio Jeker wrote: > This is the changes that I added to rpki-client http.c which I have not > yet merged into ftp(1) OK millert@ - todd

replace SRP with SMR in the if_idxmap commit

2022-11-09 Thread Hrvoje Popovski
Hi all, I've checkout cvs half an hour ago on two boxes and both boxes won't properly boot. First one stops here ppb10 at pci1 dev 28 function 4 "Intel 8 Series PCIE" rev 0xd5: msi pci12 at ppb10 bus 13 em4 at pci12 dev 0 function 0 "Intel I350" rev 0x01: msi, address 00:25:90:5d:c9:9a em5 at

Re: replace SRP with SMR in the if_idxmap commit

2022-11-09 Thread David Gwynne
I know what this is. The barrier at the end of if_idxmap_alloc is sleeping waiting for cpus to run that aren't running cos we haven't finished booting yet. I'll back it out and fix it up when I'm actually awake. dlg > On 10 Nov 2022, at 6:28 am, Hrvoje Popovski wrote: > > Hi all, > > I've

relayd: always call va_end

2022-11-09 Thread Moritz Buhl
The same code is in httpd but there it was fixed in commit 6b535b529336a3fd1beb56c42ff5755b84ba9b03 Author: jung Date: Sun May 22 19:19:21 2016 + fix unbalanced va_start and va_end macros from Hiltjo Posthuma "do." deraadt Found by codechecker OK? mbuhl Index:

Re: relayd: uninitialized errstr

2022-11-09 Thread Theo Buehler
On Thu, Nov 10, 2022 at 01:10:51AM +0100, Moritz Buhl wrote: > errstr is never set but fail does: > RSA_meth_free(rsae_method); > fatalx("%s: %s", __func__, errstr); > Found by codechecker. > > OK? Needs more braces > mbuhl > > Index: ca.c >

Re: relayd: always call va_end

2022-11-09 Thread Todd C . Miller
Yes, OK millert@ - todd

Re: relayd: uninitialized errstr

2022-11-09 Thread Moritz Buhl
On Thu, Nov 10, 2022 at 01:29:13AM +0100, Theo Buehler wrote: > On Thu, Nov 10, 2022 at 01:10:51AM +0100, Moritz Buhl wrote: > > errstr is never set but fail does: > > RSA_meth_free(rsae_method); > > fatalx("%s: %s", __func__, errstr); > > Found by codechecker. > > > > OK? > >

Re: relayd: uninitialized errstr

2022-11-09 Thread Theo Buehler
On Thu, Nov 10, 2022 at 01:35:09AM +0100, Moritz Buhl wrote: > On Thu, Nov 10, 2022 at 01:29:13AM +0100, Theo Buehler wrote: > > On Thu, Nov 10, 2022 at 01:10:51AM +0100, Moritz Buhl wrote: > > > errstr is never set but fail does: > > > RSA_meth_free(rsae_method); > > > fatalx("%s:

Re: ifconfig description for wireguard peers

2022-11-09 Thread Mikolaj Kucharski
On Wed, Oct 20, 2021 at 10:20:09PM -0400, Noah Meier wrote: > Hi, > > While wireguard interfaces can have a description set by ifconfig, wireguard > peers currently cannot. I now have a lot of peers and descriptions of them in > ifconfig would be helpful. > > This diff adds a 'wgdesc' option

relayd: uninitialized errstr

2022-11-09 Thread Moritz Buhl
errstr is never set but fail does: RSA_meth_free(rsae_method); fatalx("%s: %s", __func__, errstr); Found by codechecker. OK? mbuhl Index: ca.c === RCS file: /cvs/src/usr.sbin/relayd/ca.c,v retrieving revision 1.39

Re: ifconfig description for wireguard peers

2022-11-09 Thread Mikolaj Kucharski
On Thu, Nov 10, 2022 at 12:53:07AM +, Mikolaj Kucharski wrote: > On Wed, Oct 20, 2021 at 10:20:09PM -0400, Noah Meier wrote: > > Hi, > > > > While wireguard interfaces can have a description set by ifconfig, > > wireguard peers currently cannot. I now have a lot of peers and > >