[PATCH 1/5] pf: Add RTEMS_BSD_CONFIG_FIREWALL_xxx options.

Christian Mauderer christian.mauderer at embedded-brains.de
Mon Aug 8 14:32:56 UTC 2016


From: Christian Mauderer <Christian.Mauderer at embedded-brains.de>

---
 rtemsbsd/include/machine/rtems-bsd-config.h | 28 ++++++++++++++++++++++++++++
 testsuite/pf01/test_main.c                  |  4 ++--
 testsuite/pf02/test_main.c                  |  4 ++--
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/rtemsbsd/include/machine/rtems-bsd-config.h b/rtemsbsd/include/machine/rtems-bsd-config.h
index 7a4750f..84562bf 100644
--- a/rtemsbsd/include/machine/rtems-bsd-config.h
+++ b/rtemsbsd/include/machine/rtems-bsd-config.h
@@ -119,6 +119,27 @@ extern "C" {
 #endif /* RTEMS_BSD_CONFIG_NET_IF_VLAN */
 
 /*
+ * Firewall PF
+ */
+#if defined(RTEMS_BSD_CONFIG_FIREWALL_PF)
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PF SYSINIT_NEED_FIREWALL_PF
+#else
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PF
+#endif /* RTEMS_BSD_CONFIG_FIREWALL_PF */
+
+#if defined(RTEMS_BSD_CONFIG_FIREWALL_PFLOG)
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PFLOG SYSINIT_NEED_FIREWALL_PFLOG
+#else
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PFLOG
+#endif /* RTEMS_BSD_CONFIG_FIREWALL_PFLOG */
+
+#if defined(RTEMS_BSD_CONFIG_FIREWALL_PFSYNC)
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PFSYNC SYSINIT_NEED_FIREWALL_PFSYNC
+#else
+  #define RTEMS_BSD_CFGDECL_FIREWALL_PFSYNC
+#endif /* RTEMS_BSD_CONFIG_FIREWALL_PFSYNC */
+
+/*
  * FTPD
  */
 #if defined(RTEMS_BSD_CONFIG_SERVICE_FTPD)
@@ -168,6 +189,13 @@ extern "C" {
   RTEMS_BSD_CFGDECL_NET_IF_VLAN;
 
   /*
+   * Create the firewall
+   */
+  RTEMS_BSD_CFGDECL_FIREWALL_PF;
+  RTEMS_BSD_CFGDECL_FIREWALL_PFLOG;
+  RTEMS_BSD_CFGDECL_FIREWALL_PFSYNC;
+
+  /*
    * Create the services.
    */
   RTEMS_BSD_CFGDECL_TELNETD;
diff --git a/testsuite/pf01/test_main.c b/testsuite/pf01/test_main.c
index 488884b..6d9f563 100644
--- a/testsuite/pf01/test_main.c
+++ b/testsuite/pf01/test_main.c
@@ -491,7 +491,7 @@ test_main(void)
 
 #include <machine/rtems-bsd-sysinit.h>
 
-SYSINIT_NEED_FIREWALL_PF;
-SYSINIT_NEED_FIREWALL_PFLOG;
+#define RTEMS_BSD_CONFIG_FIREWALL_PF
+#define RTEMS_BSD_CONFIG_FIREWALL_PFLOG
 
 #include <rtems/bsd/test/default-network-init.h>
diff --git a/testsuite/pf02/test_main.c b/testsuite/pf02/test_main.c
index 3526c88..e81d204 100644
--- a/testsuite/pf02/test_main.c
+++ b/testsuite/pf02/test_main.c
@@ -176,8 +176,8 @@ test_main(void)
 
 #include <machine/rtems-bsd-sysinit.h>
 
-SYSINIT_NEED_FIREWALL_PF;
-SYSINIT_NEED_FIREWALL_PFLOG;
+#define RTEMS_BSD_CONFIG_FIREWALL_PF
+#define RTEMS_BSD_CONFIG_FIREWALL_PFLOG
 #define CONFIGURE_MAXIMUM_DRIVERS 32
 
 #include <rtems/bsd/test/default-network-init.h>
-- 
2.9.2




More information about the devel mailing list