svn commit: r358558 - head/sys/contrib/ipfilter/netinet
Cy Schubert
cy at FreeBSD.org
Mon Mar 2 23:24:55 UTC 2020
Author: cy
Date: Mon Mar 2 23:24:53 2020
New Revision: 358558
URL: https://svnweb.freebsd.org/changeset/base/358558
Log:
Continuing the effort started in r343701, #ifdef cleanup, checking for
__FreeBSD_version > 3.0 and 5.0 is redundant.
MFC after: 3 days
Modified:
head/sys/contrib/ipfilter/netinet/ip_compat.h
head/sys/contrib/ipfilter/netinet/ip_fil.h
head/sys/contrib/ipfilter/netinet/ip_proxy.c
head/sys/contrib/ipfilter/netinet/ip_state.c
head/sys/contrib/ipfilter/netinet/ip_sync.c
Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 22:54:32 2020 (r358557)
+++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:53 2020 (r358558)
@@ -126,7 +126,7 @@
* There may be other, safe, kernels but this is not extensively tested yet.
*/
# define HAVE_M_PULLDOWN
-# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000)
+# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version)
# include "opt_ipfilter.h"
# endif
# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c))
Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 22:54:32 2020 (r358557)
+++ head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 23:24:53 2020 (r358558)
@@ -1420,8 +1420,7 @@ typedef struct ipftune {
** HPUX Port
*/
-#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \
- (__FreeBSD_version >= 220000)
+#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version)
# define CDEV_MAJOR 79
#endif
Modified: head/sys/contrib/ipfilter/netinet/ip_proxy.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 22:54:32 2020 (r358557)
+++ head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 23:24:53 2020 (r358558)
@@ -51,7 +51,7 @@
# include <sys/stream.h>
# include <sys/kmem.h>
#endif
-#if __FreeBSD_version >= 300000
+#ifdef __FreeBSD_version
# include <sys/queue.h>
#endif
#include <net/if.h>
Modified: head/sys/contrib/ipfilter/netinet/ip_state.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 22:54:32 2020 (r358557)
+++ head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 23:24:53 2020 (r358558)
@@ -82,7 +82,7 @@
#ifdef USE_INET6
#include <netinet/icmp6.h>
#endif
-#if FREEBSD_GE_REV(300000)
+#ifdef __FreeBSD_version
# include <sys/malloc.h>
# if defined(_KERNEL) && !defined(IPFILTER_LKM)
# include <sys/libkern.h>
@@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max
/*
* XXX - ipf_state_seed[X] should be a random number of sorts.
*/
-#if FREEBSD_GE_REV(400000)
+#ifdef __FreeBSD_version
state_seed[i] = arc4random();
#else
state_seed[i] = ((u_long)state_seed + i) * state_size;
Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 22:54:32 2020 (r358557)
+++ head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:24:53 2020 (r358558)
@@ -30,7 +30,7 @@
# include <sys/mbuf.h>
# endif
# include <sys/select.h>
-# if __FreeBSD_version >= 500000
+# ifdef __FreeBSD_version
# include <sys/selinfo.h>
# endif
#endif
More information about the svn-src-head
mailing list