iked replace ibuf_advance() with ibuf_reserve()

2023-05-23 Thread Claudio Jeker
Another mechanical diff. Replace ibuf_advance() with ibuf_reserve(). Again ibuf_advance() just calls ibuf_reserve(). -- :wq Claudio Index: eap.c === RCS file: /cvs/src/sbin/iked/eap.c,v retrieving revision 1.23 diff -u -p -r1.23

ibuf_open, ibuf_dynamic and zero length buffers

2023-05-23 Thread Claudio Jeker
Calling malloc() with a zero length is entering underspecified territory. So ibuf_open(0) but more importantly ibuf_dynamic(0, max) step right into that trap. In the first case the call makes little sense and we should error out. In the second case it is better to skip the allocation of the buffer

ix(4): LRO forwarding

2023-05-23 Thread Jan Klemkow
Hi, This diff sets needed offloading flags and the calculated mss to LRO mbufs in ix(4). Thus, we can forward this packets and process them via tcp_if_output_tso(). This diff also uses tcp_if_output_tso() in ip6_forward(). I tested the ip6_forward path via the address family transition in pf:

iked replace ibuf_release() with ibuf_free()

2023-05-23 Thread Claudio Jeker
This is mostly a mechanical diff replacing ibuf_release with ibuf_free. ibuf_release() just calls ibuf_free() now so this indirection is no longer needed. -- :wq Claudio Index: ca.c === RCS file: /cvs/src/sbin/iked/ca.c,v

Re: iked replace ibuf_release() with ibuf_free()

2023-05-23 Thread Theo Buehler
On Tue, May 23, 2023 at 02:49:35PM +0200, Claudio Jeker wrote: > This is mostly a mechanical diff replacing ibuf_release with ibuf_free. > ibuf_release() just calls ibuf_free() now so this indirection is no longer > needed. ok tb

Re: iked replace ibuf_advance() with ibuf_reserve()

2023-05-23 Thread Tobias Heider
On Tue, May 23, 2023 at 03:20:27PM +0200, Claudio Jeker wrote: > Another mechanical diff. Replace ibuf_advance() with ibuf_reserve(). > > Again ibuf_advance() just calls ibuf_reserve(). ok too > -- > :wq Claudio > > Index: eap.c >

Re: iked replace ibuf_advance() with ibuf_reserve()

2023-05-23 Thread Theo Buehler
On Tue, May 23, 2023 at 03:20:27PM +0200, Claudio Jeker wrote: > Another mechanical diff. Replace ibuf_advance() with ibuf_reserve(). > > Again ibuf_advance() just calls ibuf_reserve(). ok

rpki-client: signedData content-type check

2023-05-23 Thread Theo Buehler
When looking through the list of things to check in RFC 6488 section 3, I wondered why we don't check for the SignedData content-type (1a). I'm sure we discussed back when reworked this code that this is implicit in CMS_get0_SignerInfos() and the assert following it... However, I think this

Re: ibuf_open, ibuf_dynamic and zero length buffers

2023-05-23 Thread Theo Buehler
On Tue, May 23, 2023 at 11:50:04AM +0200, Claudio Jeker wrote: > Calling malloc() with a zero length is entering underspecified territory. > So ibuf_open(0) but more importantly ibuf_dynamic(0, max) step right into > that trap. In the first case the call makes little sense and we should > error

Re: iked imsg_util.c cleanup

2023-05-23 Thread Tobias Heider
On Tue, May 23, 2023 at 11:56:18AM +0200, Claudio Jeker wrote: > There is a lot of duplication in iked's imsg_util.c > Now here is a minimal diff removing all extra parts added that are not > needed anymore. The removal of ibuf_zero() depends partially on my > previous imsg diff. > > With my imsg

iked imsg_util.c cleanup

2023-05-23 Thread Claudio Jeker
There is a lot of duplication in iked's imsg_util.c Now here is a minimal diff removing all extra parts added that are not needed anymore. The removal of ibuf_zero() depends partially on my previous imsg diff. With my imsg diff allocation are always zeroed so no need to call imsg_zero(). In

Re: iked imsg_util.c cleanup

2023-05-23 Thread Theo Buehler
On Tue, May 23, 2023 at 11:56:18AM +0200, Claudio Jeker wrote: > There is a lot of duplication in iked's imsg_util.c > Now here is a minimal diff removing all extra parts added that are not > needed anymore. The removal of ibuf_zero() depends partially on my > previous imsg diff. > > With my imsg

patch: make CRYPTO_get_ex_new_index not return 0

2023-05-23 Thread Marc Aldorasi
The man page for CRYPTO_get_ex_new_index says that "the value 0 is reserved for the legacy "app_data" APIs", but the function can still return 0, which can cause issues for programs that use both APIs. The attached patch causes the returned indices to start at 1 instead. See also the

Re: ifconfig description for wireguard peers

2023-05-23 Thread Klemens Nanni
On Sat, Jan 14, 2023 at 02:28:27PM +, Stuart Henderson wrote: > On 2023/01/12 04:49, Mikolaj Kucharski wrote: > > Hi, > > > > Is there anything else which I can do, to help this diff reviwed and > > increase the chance of getting in? > > > > Thread at https://marc.info/?t=16347829861=1=2

Installer: use $(

2023-05-23 Thread Christian Weisgerber
This replaces "$(cat file)" with the ksh construct "$(/dev/null) unchanged, since it would require { local var=$(<$HTTP_SEC); } 2>/dev/null which is sufficiently opaque that I'm not sure it's an improvement. --- distrib/miniroot/install.sub +++ distrib/miniroot/install.sub @@ -77,7

Re: Installer: use $(

2023-05-23 Thread Klemens Nanni
On Tue, May 23, 2023 at 11:41:32PM +0200, Christian Weisgerber wrote: > This replaces "$(cat file)" with the ksh construct "$( Admittedly cosmetic. Functional behaviour won't change, but stderr handling is subtly different, as you're gladly aware of. > I have left the line > > local