PATCH: rad(8) Better PIO default lifetimes (was: Re: Improve handling of IPv6 SLAAC renumbering scenarios)

2020-03-27 Thread Fernando Gont
Florian/folks, This is an improved version: Essentially, if the lifetime of a prefix is not specified (i.e., the admin relies on the default values), the Preferred Lifetime is set to the Router Lifetime, and the Valid Lifetime is set to Router Lifetime * 48 (one day) This improve the state

Re: Regarding the understanding of the malloc(3) code

2020-03-27 Thread Neeraj Pal
On Fri, Mar 27, 2020 at 3:21 PM Otto Moerbeek wrote: > For chunk size 256, there will indeed be 16 chunks in a page. i will > *not* be 255 in that case, but 15. There is no such thing as > MALLOC_BYTES. the memset will becomes memset(p->bits, 0xff, 2) and > set p->bits[0] to to 0x The

IPMI diff

2020-03-27 Thread Mark Kettenis
The diff below adds support for ipmi(4) on the od3000. But since this has tentacles in the generic IPMI code I'd appreciate a quick test on an i386/amd64 system with IPMI. ok? Index: arch/arm64/conf/GENERIC === RCS file:

Re: slaacd: Reduce maximum IPv6 PIO lifetimes

2020-03-27 Thread Florian Obser
On Fri, Mar 27, 2020 at 12:24:27PM -0600, Theo de Raadt wrote: > +#ifndef MIN > +#defineMIN(_a,_b) ((_a) < (_b) ? (_a) : (_b)) > > Please use MINIMUM() for the name, as elsewhere. You also don't need the _. > diff --git engine.c engine.c index 8f2c4297225..f461708af77 100644 ---

Re: slaacd: Reduce maximum IPv6 PIO lifetimes

2020-03-27 Thread Fernando Gont
On 27/3/20 15:21, Florian Obser wrote: I do like the limiting of pltime to router lifetime, the factor of 48 though. I don't know it seems like pulled out of thin air or to make the math work out to 1 day. It was made out so that vltime would be one day. To be honest, I believe that it could

Re: slaacd: Reduce maximum IPv6 PIO lifetimes

2020-03-27 Thread Theo de Raadt
+#ifndef MIN +#defineMIN(_a,_b) ((_a) < (_b) ? (_a) : (_b)) Please use MINIMUM() for the name, as elsewhere. You also don't need the _.

Re: slaacd: Reduce maximum IPv6 PIO lifetimes

2020-03-27 Thread Florian Obser
I do like the limiting of pltime to router lifetime, the factor of 48 though. I don't know it seems like pulled out of thin air or to make the math work out to 1 day. I'm not fundamentally opposed to it and I'm fine with this going in if the draft is accepted or if it's clear that there is going

Re: Prevent memory corruption by pipex_timer()

2020-03-27 Thread Vitaliy Makkoveev
On Fri, Mar 27, 2020 at 03:13:01PM +0100, Martin Pieuchot wrote: > On 27/03/20(Fri) 15:16, Vitaliy Makkoveev wrote: > > On Fri, Mar 27, 2020 at 10:43:52AM +0100, Martin Pieuchot wrote: > > > Do you have a backtrace for the memory corruption? Could you share it? > > Yes. Apply path below, compile

Re: PATCH: More apprrpriate vltime for IPv6 temp addrs (rfc4941bis)

2020-03-27 Thread Florian Obser
On Fri, Mar 27, 2020 at 12:58:18PM -0300, Fernando Gont wrote: > Hello, Florian, > > > On 27/3/20 12:20, Florian Obser wrote: > > Nice, > > > > as the draft states: > >The default Valid Lifetime for temporary addresses has been > >reduced from 1 week to 2 days, decreasing the

Re: PATCH: More apprrpriate vltime for IPv6 temp addrs (rfc4941bis)

2020-03-27 Thread Fernando Gont
Hello, Florian, On 27/3/20 12:20, Florian Obser wrote: Nice, as the draft states: The default Valid Lifetime for temporary addresses has been reduced from 1 week to 2 days, decreasing the typical number of concurrent temporary addresses from 7 to 2. This had been a

Re: iked ikev2_ikesa_enable is not copying sa_eapid

2020-03-27 Thread Tobias Heider
On Fri, Mar 27, 2020 at 10:39:52AM -0300, Bernardo Vieira wrote: > Hi, > inside the function ikev2_ikesa_enable the atribute sa_eapid should > be copied to the new sa. > Regards, > Bernardo Looks correct, thank you. Committed! > > Index: ikev2.c >

Re: PATCH: More apprrpriate vltime for IPv6 temp addrs (rfc4941bis)

2020-03-27 Thread Florian Obser
Nice, as the draft states: The default Valid Lifetime for temporary addresses has been reduced from 1 week to 2 days, decreasing the typical number of concurrent temporary addresses from 7 to 2. This had been a complained on numerous occasions. This made me realize that we can

Re: Prevent memory corruption by pipex_timer()

2020-03-27 Thread Martin Pieuchot
On 27/03/20(Fri) 15:16, Vitaliy Makkoveev wrote: > On Fri, Mar 27, 2020 at 10:43:52AM +0100, Martin Pieuchot wrote: > > Do you have a backtrace for the memory corruption? Could you share it? > Yes. Apply path below, compile and run code, and when you had see > "pipex_session ... killed" kill this

iked ikev2_ikesa_enable is not copying sa_eapid

2020-03-27 Thread Bernardo Vieira
Hi, inside the function ikev2_ikesa_enable the atribute sa_eapid should be copied to the new sa. Regards, Bernardo Index: ikev2.c === RCS file: /cvs/src/sbin/iked/ikev2.c,v retrieving revision 1.203 diff -u -p -r1.203 ikev2.c ---

Re: Prevent memory corruption by pipex_timer()

2020-03-27 Thread Vitaliy Makkoveev
On Fri, Mar 27, 2020 at 10:43:52AM +0100, Martin Pieuchot wrote: > Do you have a backtrace for the memory corruption? Could you share it? Yes. Apply path below, compile and run code, and when you had see "pipex_session ... killed" kill this code. Screenshot attached. STABLE-6.[56] are affected

Re: Prevent memory corruption by pipex_timer()

2020-03-27 Thread Vitaliy Makkoveev
On Fri, Mar 27, 2020 at 03:16:54PM +0300, Vitaliy Makkoveev wrote: > On Fri, Mar 27, 2020 at 10:43:52AM +0100, Martin Pieuchot wrote: > > Do you have a backtrace for the memory corruption? Could you share it? > Yes. Apply path below, compile and run code, and when you had see > "pipex_session ...

PATCH: More apprrpriate vltime for IPv6 temp addrs (rfc4941bis)

2020-03-27 Thread Fernando Gont
Folks, This changes the default Valid Lifetime of temporary addresses to 2 days (as per draft-ietf-6man-rfc4941bis): cut here diff --git nd6.h nd6.h index 4449a7ed73c..de80dc16047 100644 --- nd6.h +++ nd6.h @@ -91,7 +91,7 @@ structin6_ndifreq { /* constants for RFC 4941

Re: Regarding the understanding of the malloc(3) code

2020-03-27 Thread Otto Moerbeek
On Fri, Mar 27, 2020 at 02:21:44PM +0530, Neeraj Pal wrote: > On Wed, Mar 25, 2020 at 2:06 AM Otto Moerbeek wrote: > > > pp points to a page of chunks > > bp point to the associated meta info: a bitmap that says which chunks > > in the page are free. The bitmap is an aray of shorts, so 16 bits

Re: Prevent memory corruption by pipex_timer()

2020-03-27 Thread Martin Pieuchot
On 27/03/20(Fri) 11:58, Vitaliy Makkoveev wrote: > Each pipex_session has timeout_sec field and if it is not 0, > pipex_timer() can destroy pipex_session. Each pppx_if contents > pipex_session. If userland creates pppx_if and pipex_session has > timeout (for example, npppd.conf has idle-timeout

Prevent memory corruption by pipex_timer()

2020-03-27 Thread Vitaliy Makkoveev
Each pipex_session has timeout_sec field and if it is not 0, pipex_timer() can destroy pipex_session. Each pppx_if contents pipex_session. If userland creates pppx_if and pipex_session has timeout (for example, npppd.conf has idle-timeout option), pipex_timer() can destroy this pipex_session and

Re: Regarding the understanding of the malloc(3) code

2020-03-27 Thread Neeraj Pal
On Wed, Mar 25, 2020 at 2:06 AM Otto Moerbeek wrote: > pp points to a page of chunks > bp point to the associated meta info: a bitmap that says which chunks > in the page are free. The bitmap is an aray of shorts, so 16 bits per > entry. > per entry means for our case bits[1], so only one