Re: usr.bin/mg: fix -Wunused-but-set-variable warnings

2022-01-19 Thread Philip Guenther
On Sun, Jan 16, 2022 at 8:10 AM Christian Weisgerber wrote: > usr.bin/mg: fix -Wunused-but-set-variable warnings > > * strtonum() is only called to verify that a string is numerical, the > return value is unused. > * inlist is no longer used after the code was refactored. > > OK? > ok

Re: usr.sbin/dvmrpctl: fix -Wunused-but-set-variable warning

2022-01-19 Thread Philip Guenther
On Sun, Jan 16, 2022 at 12:51 PM Christian Weisgerber wrote: > usr.sbin/dvmrpctl: fix -Wunused-but-set-variable warning > > This looks like /* not yet implemented */, but the companion functions > show_rib_detail_msg() and show_mfc_detail_msg() are equally empty. > ok guenther@

Re: usr.sbin/eigrpd: fix -Wunused-but-set-variable warning

2022-01-19 Thread Philip Guenther
On Sun, Jan 16, 2022 at 1:51 PM Christian Weisgerber wrote: > usr.sbin/eigrpd: fix -Wunused-but-set-variable warning > ok guenther@

Re: usr.sbin/ospf6ctl: fix -Wunused-but-set-variable warning

2022-01-19 Thread Philip Guenther
On Mon, Jan 17, 2022 at 6:36 AM Christian Weisgerber wrote: > usr.sbin/ospf6ctl: fix -Wunused-but-set-variable warning > > Maybe this is uncompleted code, but I think we can remove it for > the time being. > > M usr.sbin/ospf6ctl/ospf6ctl.c > Agreed. ok guenther@

kubsan undefined behavior 1U shift

2022-01-19 Thread Alexander Bluhm
Hi, Compiling the kernel with option KUBSAN finds undefined behavior. Here are some easy fixes that shift signed values too far. kubsan: arch/amd64/amd64/identcpu.c:882:17: shift: left shift of negative value -1 kubsan: kern/kern_descrip.c:159:30: shift: left shift of 1 by 31 places cannot be

rpki-client: factor filename extension parsing into a function

2022-01-19 Thread Theo Buehler
Not sure if it is that much of a win, but it saves some repetition and makes sure we don't forget checking the file name to be longer than 4 another time (missed on review in main() and proc_parser_file()). Index: extern.h === RCS

OpenBSD Errata: January 19, 2022 (libexpat vmm)

2022-01-19 Thread Alexander Bluhm
Errata patches for expat XML library have been released for OpenBSD 6.9 and 7.0. Errata patch for kernel vmm has been released for OpenBSD 7.0. Binary updates for the amd64, i386 and arm64 platform are available via the syspatch utility. Source code patches can be found on the respective errata

Re: Implement rpki-client -f file

2022-01-19 Thread Job Snijders
OK job@

Re: Implement rpki-client -f file

2022-01-19 Thread Theo Buehler
On Wed, Jan 19, 2022 at 02:57:44PM +0100, Claudio Jeker wrote: > > > + return; > > > + } > > > + > > > + /* TA found play back the stack and add all certs */ > > > + do { > > > + if (parser_cert_validate(nfile, cert) == NULL) > > > + break; > > > > I think this

snmpd(8): clean up variable printing

2022-01-19 Thread Martijn van Duren
The new code uses smi_print_element when debugging is enabled to trace calls. Unfortunately the current smi_print_element lacks in quite a few departments. This diff rewrites smi_print_element to be more concise than what we currently have, without moving into the more complex territory that

Re: Implement rpki-client -f file

2022-01-19 Thread Claudio Jeker
On Wed, Jan 19, 2022 at 12:56:21PM +0100, Theo Buehler wrote: > On Wed, Jan 19, 2022 at 11:06:06AM +0100, Claudio Jeker wrote: > > The idea is that rpki-client -f file will show a human readable output for > > file. It will also verify that file is valid (or show an error if not). > > > > This

Re: Implement rpki-client -f file

2022-01-19 Thread Theo Buehler
On Wed, Jan 19, 2022 at 11:06:06AM +0100, Claudio Jeker wrote: > The idea is that rpki-client -f file will show a human readable output for > file. It will also verify that file is valid (or show an error if not). > > This implements this as a first version. Especially the output needs >

Re: usr.sbin/ospf6d: fix -Wunused-but-set-variable warnings

2022-01-19 Thread Claudio Jeker
On Mon, Jan 17, 2022 at 02:54:32PM +0100, Christian Weisgerber wrote: > usr.sbin/ospf6d: fix -Wunused-but-set-variable warnings > > merge_config() sets "rchange", but doesn't use it. Comparing the > code to osfpd/ospfd.c makes me think that's an omission. Either > way it seems odd that the two

Re: rpki-client x509 verification in common function

2022-01-19 Thread Claudio Jeker
On Tue, Jan 18, 2022 at 02:41:38PM +0100, Claudio Jeker wrote: > On Tue, Jan 18, 2022 at 02:09:08PM +0100, Theo Buehler wrote: > > On Tue, Jan 18, 2022 at 12:16:44PM +0100, Claudio Jeker wrote: > > > How X509_verify_cert() is called in rpki-client is mostly the same in all > > > places so move all

Implement rpki-client -f file

2022-01-19 Thread Claudio Jeker
The idea is that rpki-client -f file will show a human readable output for file. It will also verify that file is valid (or show an error if not). This implements this as a first version. Especially the output needs improvement but parsing and validation works. For validation rpki-client needs to

Re: rpki-client: plug leak in queue_add_from_tal()

2022-01-19 Thread Claudio Jeker
On Wed, Jan 19, 2022 at 09:35:34AM +0100, Theo Buehler wrote: > This is the straightforward way to fix the leak of nfile in case the > repo isn't found. The other option would be to defer the strdup until > after successful lookup, but that felt clunky. Yes, that's OK claudio@. I agree that this

rpki-client: plug leak in queue_add_from_tal()

2022-01-19 Thread Theo Buehler
This is the straightforward way to fix the leak of nfile in case the repo isn't found. The other option would be to defer the strdup until after successful lookup, but that felt clunky. While I'm here: Any objections to silencing this annoying compiler warning in main.c? The other option would