Re: [PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Christian MAUDERER
Hello Joel, Am 07.05.21 um 16:45 schrieb Joel Sherrill: On Fri, May 7, 2021 at 9:04 AM Christian MAUDERER > wrote: It is a bit hard to see: The setkey programm uses the functions from this library. In pfkey_open, a socket is opened and r

Re: [PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Joel Sherrill
On Fri, May 7, 2021 at 9:04 AM Christian MAUDERER < christian.maude...@embedded-brains.de> wrote: > It is a bit hard to see: The setkey programm uses the functions from > this library. In pfkey_open, a socket is opened and returned to setkey. > But setkey never closes it. > This much I assumed fr

Re: [PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Christian MAUDERER
It is a bit hard to see: The setkey programm uses the functions from this library. In pfkey_open, a socket is opened and returned to setkey. But setkey never closes it. We already have wrappers around all of the "dangerous" functions that allocated resources. The wrappers register the resource

Re: [PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Joel Sherrill
How does this fix a leak? On Fri, May 7, 2021 at 7:09 AM Christian MAUDERER < christian.maude...@embedded-brains.de> wrote: > Note that I would like to push this patch on 5-freebsd-12 as well as on > master. > > Best regards > > Christian > > > Am 07.05.21 um 14:08 schrieb Christian Mauderer: > >

Re: [PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Christian MAUDERER
Note that I would like to push this patch on 5-freebsd-12 as well as on master. Best regards Christian Am 07.05.21 um 14:08 schrieb Christian Mauderer: Fixes #4404 --- ipsec-tools/src/libipsec/pfkey.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ipsec-tools/src/libipsec/pfke

[PATCH rtems-libbsd] ipsec-tools/pfkey: Fix socket leak

2021-05-07 Thread Christian Mauderer
Fixes #4404 --- ipsec-tools/src/libipsec/pfkey.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ipsec-tools/src/libipsec/pfkey.c b/ipsec-tools/src/libipsec/pfkey.c index a621be12..385a21a9 100644 --- a/ipsec-tools/src/libipsec/pfkey.c +++ b/ipsec-tools/src/libipsec/pfkey.c @@ -1,5 +1,1