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

Christian Mauderer christian.mauderer at embedded-brains.de
Fri May 7 12:08:21 UTC 2021


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,12 @@
 #include <machine/rtems-bsd-user-space.h>
 
+#ifdef __rtems__
+/* Only need socket from rtems-bsd-program wrappers! */
+int
+rtems_bsd_program_socket(int domain, int type, int protocol);
+#define socket(domain, type, protocol) \
+    rtems_bsd_program_socket(domain, type, protocol)
+#endif /* __rtems__ */
 /*	$NetBSD: pfkey.c,v 1.21.2.1 2011/11/14 13:25:06 tteras Exp $	*/
 
 /*	$KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $	*/
-- 
2.26.2



More information about the devel mailing list