svn commit: r197937 - in user/eri/pf45/head/sys: contrib/pf/net modules/pf

Ermal Luçi eri at FreeBSD.org
Sat Oct 10 17:56:19 UTC 2009


Author: eri
Date: Sat Oct 10 17:56:18 2009
New Revision: 197937
URL: http://svn.freebsd.org/changeset/base/197937

Log:
  pfsync(4) can be loaded at runtime.
  Remove leftovers notyet defines for pfsync(4).

Modified:
  user/eri/pf45/head/sys/contrib/pf/net/pf.c
  user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c
  user/eri/pf45/head/sys/modules/pf/Makefile

Modified: user/eri/pf45/head/sys/contrib/pf/net/pf.c
==============================================================================
--- user/eri/pf45/head/sys/contrib/pf/net/pf.c	Sat Oct 10 17:41:16 2009	(r197936)
+++ user/eri/pf45/head/sys/contrib/pf/net/pf.c	Sat Oct 10 17:56:18 2009	(r197937)
@@ -3497,9 +3497,7 @@ pf_create_state(struct pf_rule *r, struc
 	if (r->rule_flag & PFRULE_PFLOW)
 		s->state_flags |= PFSTATE_PFLOW;
 	s->log = r->log & PF_LOG_ALL;
-#ifdef notyet
 	s->sync_state = PFSYNC_S_NONE;
-#endif
 	if (nr != NULL)
 		s->log |= nr->log & PF_LOG_ALL;
 	switch (pd->proto) {

Modified: user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c	Sat Oct 10 17:41:16 2009	(r197936)
+++ user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c	Sat Oct 10 17:56:18 2009	(r197937)
@@ -115,13 +115,9 @@ __FBSDID("$FreeBSD$");
 #endif
 #include <net/pfvar.h>
 
-#ifdef __FreeBSD__
-#include <net/if_pfsync.h>
-#else
 #if NPFSYNC > 0 
 #include <net/if_pfsync.h>
 #endif /* NPFSYNC > 0 */
-#endif
 
 #if NPFLOG > 0
 #include <net/if_pflog.h>
@@ -3537,7 +3533,7 @@ pfsync_state_export(struct pfsync_state 
                 state->timeout = PFTM_PURGE;
  #if NPFSYNC
                 /* don't send out individual delete messages */
-                state->state_flags = PFSTATE_NOSYNC;
+                state->sync_state = PFSTATE_NOSYNC;
  #endif
                 pf_unlink_state(state);
         }

Modified: user/eri/pf45/head/sys/modules/pf/Makefile
==============================================================================
--- user/eri/pf45/head/sys/modules/pf/Makefile	Sat Oct 10 17:41:16 2009	(r197936)
+++ user/eri/pf45/head/sys/modules/pf/Makefile	Sat Oct 10 17:56:18 2009	(r197937)
@@ -26,9 +26,12 @@ opt_bpf.h:
 	echo "#define DEV_BPF 1" > ${.TARGET}
 
 # pflog can be loaded as a module, have the additional checks turned on
+# pfsync can be loaded as a module, have the additional checks turned on
 opt_pf.h:
 	echo "#define DEV_PF 1" > ${.TARGET}
 	echo "#define DEV_PFLOG 1" >> ${.TARGET}
+	echo "#define DEV_PFSYNC 1" >> ${.TARGET}
+
 .endif
 
 .include <bsd.kmod.mk>


More information about the svn-src-user mailing list