Indentation cleanup resulting from the cleanup of #ifdefs.
The conscious decision was made not to perform any indentation or whitespace cleanup while cleaning out old redunant #ifdefs. The reason for this was to avoid confusing future readers of history and diffs with cosmetic changes, making bisection of any possible bugs introduced more difficult. This commit cleans up the whitespace detritus left behind from the previous #ifdef cleanup commits. MFC after: 1 week
This commit is contained in:
parent
4cd1807c7d
commit
7071734fae
@ -4117,11 +4117,11 @@ ipf_sync(softc, ifp)
|
||||
{
|
||||
int i;
|
||||
|
||||
# if !SOLARIS
|
||||
#if !SOLARIS
|
||||
ipf_nat_sync(softc, ifp);
|
||||
ipf_state_sync(softc, ifp);
|
||||
ipf_lookup_sync(softc, ifp);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
WRITE_ENTER(&softc->ipf_mutex);
|
||||
(void) ipf_synclist(softc, softc->ipf_acct[0][softc->ipf_active], ifp);
|
||||
@ -4168,13 +4168,13 @@ copyinptr(softc, src, dst, size)
|
||||
caddr_t ca;
|
||||
int error;
|
||||
|
||||
# if SOLARIS
|
||||
#if SOLARIS
|
||||
error = COPYIN(src, &ca, sizeof(ca));
|
||||
if (error != 0)
|
||||
return error;
|
||||
# else
|
||||
#else
|
||||
bcopy(src, (caddr_t)&ca, sizeof(ca));
|
||||
# endif
|
||||
#endif
|
||||
error = COPYIN(ca, dst, size);
|
||||
if (error != 0) {
|
||||
IPFERROR(3);
|
||||
|
@ -81,13 +81,13 @@
|
||||
# undef KERNEL
|
||||
#endif
|
||||
#include <netinet/tcp.h>
|
||||
# if defined(__FreeBSD_version)
|
||||
#if defined(__FreeBSD_version)
|
||||
# include <net/if_var.h>
|
||||
# define IF_QFULL _IF_QFULL
|
||||
# define IF_DROP _IF_DROP
|
||||
# endif
|
||||
# include <netinet/in_var.h>
|
||||
# include <netinet/tcp_fsm.h>
|
||||
#endif
|
||||
#include <netinet/in_var.h>
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include "netinet/ip_compat.h"
|
||||
@ -298,9 +298,9 @@ ipf_auth_soft_destroy(softc, arg)
|
||||
{
|
||||
ipf_auth_softc_t *softa = arg;
|
||||
|
||||
# if SOLARIS && defined(_KERNEL)
|
||||
#if SOLARIS && defined(_KERNEL)
|
||||
cv_destroy(&softa->ipf_auth_wait);
|
||||
# endif
|
||||
#endif
|
||||
MUTEX_DESTROY(&softa->ipf_auth_mx);
|
||||
RW_DESTROY(&softa->ipf_authlk);
|
||||
|
||||
|
@ -56,16 +56,16 @@
|
||||
/*
|
||||
* This is a workaround for <sys/uio.h> troubles on FreeBSD and OpenBSD.
|
||||
*/
|
||||
# ifndef _KERNEL
|
||||
#ifndef _KERNEL
|
||||
# define ADD_KERNEL
|
||||
# define _KERNEL
|
||||
# define KERNEL
|
||||
# endif
|
||||
# include <sys/uio.h>
|
||||
# ifdef ADD_KERNEL
|
||||
#endif
|
||||
#include <sys/uio.h>
|
||||
#ifdef ADD_KERNEL
|
||||
# undef _KERNEL
|
||||
# undef KERNEL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define NETBSD_GE_REV(x) (defined(__NetBSD_Version__) && \
|
||||
(__NetBSD_Version__ >= (x)))
|
||||
@ -78,20 +78,20 @@
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* F R E E B S D */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
# define HAS_SYS_MD5_H 1
|
||||
# if defined(_KERNEL)
|
||||
#define HAS_SYS_MD5_H 1
|
||||
#if defined(_KERNEL)
|
||||
# include "opt_bpf.h"
|
||||
# include "opt_inet6.h"
|
||||
# if defined(INET6) && !defined(USE_INET6)
|
||||
# define USE_INET6
|
||||
# endif
|
||||
# else
|
||||
#else
|
||||
# if !defined(USE_INET6) && !defined(NOINET6)
|
||||
# define USE_INET6
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if defined(_KERNEL)
|
||||
#if defined(_KERNEL)
|
||||
# include <netinet/ip_var.h>
|
||||
# define p_cred td_ucred
|
||||
# define p_uid td_ucred->cr_ruid
|
||||
@ -107,19 +107,19 @@
|
||||
# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c))
|
||||
# define COPYOUT(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c))
|
||||
|
||||
# else
|
||||
#else
|
||||
# include <inttypes.h>
|
||||
# endif /* _KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
# include <sys/selinfo.h>
|
||||
# include <sys/lock.h>
|
||||
# include <sys/malloc.h>
|
||||
# include <sys/mutex.h>
|
||||
# define KRWLOCK_FILL_SZ 56
|
||||
# define KMUTEX_FILL_SZ 56
|
||||
# include <sys/rwlock.h>
|
||||
# define KMUTEX_T struct mtx
|
||||
# define KRWLOCK_T struct rwlock
|
||||
#include <sys/selinfo.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#define KRWLOCK_FILL_SZ 56
|
||||
#define KMUTEX_FILL_SZ 56
|
||||
#include <sys/rwlock.h>
|
||||
#define KMUTEX_T struct mtx
|
||||
#define KRWLOCK_T struct rwlock
|
||||
|
||||
#ifdef _KERNEL
|
||||
# define READ_ENTER(x) rw_rlock(&(x)->ipf_lk)
|
||||
@ -179,7 +179,7 @@
|
||||
typedef struct mbuf mb_t;
|
||||
|
||||
#else /* !_KERNEL */
|
||||
#ifndef _NET_IF_VAR_H_
|
||||
# ifndef _NET_IF_VAR_H_
|
||||
/*
|
||||
* Userland emulation of struct ifnet.
|
||||
*/
|
||||
@ -191,11 +191,11 @@ struct ifnet {
|
||||
int (*if_output)(struct ifnet *, struct mbuf *,
|
||||
const struct sockaddr *, struct route *);
|
||||
};
|
||||
#endif /* _NET_IF_VAR_H_ */
|
||||
# endif /* _NET_IF_VAR_H_ */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
# define IFNAME(x) ((struct ifnet *)x)->if_xname
|
||||
# define COPYIFNAME(v, x, b) \
|
||||
#define IFNAME(x) ((struct ifnet *)x)->if_xname
|
||||
#define COPYIFNAME(v, x, b) \
|
||||
(void) strncpy(b, \
|
||||
((struct ifnet *)x)->if_xname, \
|
||||
LIFNAMSIZ)
|
||||
@ -226,12 +226,12 @@ typedef u_int32_t u_32_t;
|
||||
* Userland locking primitives
|
||||
*/
|
||||
#ifndef _KERNEL
|
||||
#if !defined(KMUTEX_FILL_SZ)
|
||||
# if !defined(KMUTEX_FILL_SZ)
|
||||
# define KMUTEX_FILL_SZ 1
|
||||
#endif
|
||||
#if !defined(KRWLOCK_FILL_SZ)
|
||||
# endif
|
||||
# if !defined(KRWLOCK_FILL_SZ)
|
||||
# define KRWLOCK_FILL_SZ 1
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@ -804,8 +804,8 @@ typedef struct tcpiphdr tcpiphdr_t;
|
||||
#undef IPOPT_AH
|
||||
#define IPOPT_AH 256+IPPROTO_AH
|
||||
|
||||
# define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB
|
||||
# define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB
|
||||
#define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB
|
||||
#define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB
|
||||
|
||||
#ifndef IPVERSION
|
||||
# define IPVERSION 4
|
||||
|
@ -27,7 +27,7 @@
|
||||
# endif
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
# include <sys/protosw.h>
|
||||
#include <sys/protosw.h>
|
||||
#include <sys/socket.h>
|
||||
#if defined(_KERNEL) && !defined(__SVR4)
|
||||
# include <sys/mbuf.h>
|
||||
|
@ -11,7 +11,7 @@
|
||||
#ifndef __IP_FIL_H__
|
||||
#define __IP_FIL_H__
|
||||
|
||||
# include <netinet/in.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "netinet/ip_compat.h"
|
||||
#include "netinet/ipf_rb.h"
|
||||
@ -34,45 +34,45 @@
|
||||
# define __P(x) x
|
||||
#endif
|
||||
|
||||
# define SIOCADAFR _IOW('r', 60, struct ipfobj)
|
||||
# define SIOCRMAFR _IOW('r', 61, struct ipfobj)
|
||||
# define SIOCSETFF _IOW('r', 62, u_int)
|
||||
# define SIOCGETFF _IOR('r', 63, u_int)
|
||||
# define SIOCGETFS _IOWR('r', 64, struct ipfobj)
|
||||
# define SIOCIPFFL _IOWR('r', 65, int)
|
||||
# define SIOCIPFFB _IOR('r', 66, int)
|
||||
# define SIOCADIFR _IOW('r', 67, struct ipfobj)
|
||||
# define SIOCRMIFR _IOW('r', 68, struct ipfobj)
|
||||
# define SIOCSWAPA _IOR('r', 69, u_int)
|
||||
# define SIOCINAFR _IOW('r', 70, struct ipfobj)
|
||||
# define SIOCINIFR _IOW('r', 71, struct ipfobj)
|
||||
# define SIOCFRENB _IOW('r', 72, u_int)
|
||||
# define SIOCFRSYN _IOW('r', 73, u_int)
|
||||
# define SIOCFRZST _IOWR('r', 74, struct ipfobj)
|
||||
# define SIOCZRLST _IOWR('r', 75, struct ipfobj)
|
||||
# define SIOCAUTHW _IOWR('r', 76, struct ipfobj)
|
||||
# define SIOCAUTHR _IOWR('r', 77, struct ipfobj)
|
||||
# define SIOCSTAT1 _IOWR('r', 78, struct ipfobj)
|
||||
# define SIOCSTLCK _IOWR('r', 79, u_int)
|
||||
# define SIOCSTPUT _IOWR('r', 80, struct ipfobj)
|
||||
# define SIOCSTGET _IOWR('r', 81, struct ipfobj)
|
||||
# define SIOCSTGSZ _IOWR('r', 82, struct ipfobj)
|
||||
# define SIOCSTAT2 _IOWR('r', 83, struct ipfobj)
|
||||
# define SIOCSETLG _IOWR('r', 84, int)
|
||||
# define SIOCGETLG _IOWR('r', 85, int)
|
||||
# define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve)
|
||||
# define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj)
|
||||
# define SIOCIPFGET _IOWR('r', 88, struct ipfobj)
|
||||
# define SIOCIPFSET _IOWR('r', 89, struct ipfobj)
|
||||
# define SIOCIPFL6 _IOWR('r', 90, int)
|
||||
# define SIOCIPFITER _IOWR('r', 91, struct ipfobj)
|
||||
# define SIOCGENITER _IOWR('r', 92, struct ipfobj)
|
||||
# define SIOCGTABL _IOWR('r', 93, struct ipfobj)
|
||||
# define SIOCIPFDELTOK _IOWR('r', 94, int)
|
||||
# define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj)
|
||||
# define SIOCGTQTAB _IOWR('r', 96, struct ipfobj)
|
||||
# define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj)
|
||||
# define SIOCIPFINTERROR _IOR('r', 98, int)
|
||||
#define SIOCADAFR _IOW('r', 60, struct ipfobj)
|
||||
#define SIOCRMAFR _IOW('r', 61, struct ipfobj)
|
||||
#define SIOCSETFF _IOW('r', 62, u_int)
|
||||
#define SIOCGETFF _IOR('r', 63, u_int)
|
||||
#define SIOCGETFS _IOWR('r', 64, struct ipfobj)
|
||||
#define SIOCIPFFL _IOWR('r', 65, int)
|
||||
#define SIOCIPFFB _IOR('r', 66, int)
|
||||
#define SIOCADIFR _IOW('r', 67, struct ipfobj)
|
||||
#define SIOCRMIFR _IOW('r', 68, struct ipfobj)
|
||||
#define SIOCSWAPA _IOR('r', 69, u_int)
|
||||
#define SIOCINAFR _IOW('r', 70, struct ipfobj)
|
||||
#define SIOCINIFR _IOW('r', 71, struct ipfobj)
|
||||
#define SIOCFRENB _IOW('r', 72, u_int)
|
||||
#define SIOCFRSYN _IOW('r', 73, u_int)
|
||||
#define SIOCFRZST _IOWR('r', 74, struct ipfobj)
|
||||
#define SIOCZRLST _IOWR('r', 75, struct ipfobj)
|
||||
#define SIOCAUTHW _IOWR('r', 76, struct ipfobj)
|
||||
#define SIOCAUTHR _IOWR('r', 77, struct ipfobj)
|
||||
#define SIOCSTAT1 _IOWR('r', 78, struct ipfobj)
|
||||
#define SIOCSTLCK _IOWR('r', 79, u_int)
|
||||
#define SIOCSTPUT _IOWR('r', 80, struct ipfobj)
|
||||
#define SIOCSTGET _IOWR('r', 81, struct ipfobj)
|
||||
#define SIOCSTGSZ _IOWR('r', 82, struct ipfobj)
|
||||
#define SIOCSTAT2 _IOWR('r', 83, struct ipfobj)
|
||||
#define SIOCSETLG _IOWR('r', 84, int)
|
||||
#define SIOCGETLG _IOWR('r', 85, int)
|
||||
#define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve)
|
||||
#define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj)
|
||||
#define SIOCIPFGET _IOWR('r', 88, struct ipfobj)
|
||||
#define SIOCIPFSET _IOWR('r', 89, struct ipfobj)
|
||||
#define SIOCIPFL6 _IOWR('r', 90, int)
|
||||
#define SIOCIPFITER _IOWR('r', 91, struct ipfobj)
|
||||
#define SIOCGENITER _IOWR('r', 92, struct ipfobj)
|
||||
#define SIOCGTABL _IOWR('r', 93, struct ipfobj)
|
||||
#define SIOCIPFDELTOK _IOWR('r', 94, int)
|
||||
#define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj)
|
||||
#define SIOCGTQTAB _IOWR('r', 96, struct ipfobj)
|
||||
#define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj)
|
||||
#define SIOCIPFINTERROR _IOR('r', 98, int)
|
||||
#define SIOCADDFR SIOCADAFR
|
||||
#define SIOCDELFR SIOCRMAFR
|
||||
#define SIOCINSFR SIOCINAFR
|
||||
|
@ -34,9 +34,9 @@ static const char rcsid[] = "@(#)$Id$";
|
||||
#include <sys/filio.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/systm.h>
|
||||
# include <sys/dirent.h>
|
||||
#include <sys/dirent.h>
|
||||
#if defined(__FreeBSD_version)
|
||||
#include <sys/jail.h>
|
||||
# include <sys/jail.h>
|
||||
#endif
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
@ -44,7 +44,6 @@ static const char rcsid[] = "@(#)$Id$";
|
||||
#include <sys/socket.h>
|
||||
#include <sys/selinfo.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/netisr.h>
|
||||
@ -75,19 +74,19 @@ static const char rcsid[] = "@(#)$Id$";
|
||||
#include "netinet/ip_lookup.h"
|
||||
#include "netinet/ip_dstlist.h"
|
||||
#ifdef IPFILTER_SCAN
|
||||
#include "netinet/ip_scan.h"
|
||||
# include "netinet/ip_scan.h"
|
||||
#endif
|
||||
#include "netinet/ip_pool.h"
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#ifdef CSUM_DATA_VALID
|
||||
#include <machine/in_cksum.h>
|
||||
# include <machine/in_cksum.h>
|
||||
#endif
|
||||
extern int ip_optcopy(struct ip *, struct ip *);
|
||||
|
||||
# ifdef IPFILTER_M_IPFILTER
|
||||
#ifdef IPFILTER_M_IPFILTER
|
||||
MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data structures");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
static int ipf_send_ip(fr_info_t *, mb_t *);
|
||||
@ -98,8 +97,8 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = {
|
||||
};
|
||||
#define V_ipfmain VNET(ipfmain)
|
||||
|
||||
# include <sys/conf.h>
|
||||
# include <net/pfil.h>
|
||||
#include <sys/conf.h>
|
||||
#include <net/pfil.h>
|
||||
|
||||
VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag);
|
||||
VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag);
|
||||
@ -278,8 +277,8 @@ ipfdetach(softc)
|
||||
int
|
||||
ipfioctl(dev, cmd, data, mode, p)
|
||||
struct thread *p;
|
||||
# define p_cred td_ucred
|
||||
# define p_uid td_ucred->cr_ruid
|
||||
#define p_cred td_ucred
|
||||
#define p_uid td_ucred->cr_ruid
|
||||
struct cdev *dev;
|
||||
ioctlcmd_t cmd;
|
||||
caddr_t data;
|
||||
|
@ -732,7 +732,7 @@ ipf_pool_select_add_ref(arg, unit, name)
|
||||
/* */
|
||||
/* Searches for an exact match of an entry in the pool. */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
extern void printhostmask(int, u_32_t *, u_32_t *));
|
||||
extern void printhostmask(int, u_32_t *, u_32_t *);
|
||||
static ip_pool_node_t *
|
||||
ipf_pool_findeq(softp, ipo, addr, mask)
|
||||
ipf_pool_softc_t *softp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user