summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-09-15 13:36:35 -0500
committerLuiz Otavio O Souza <luiz@netgate.com>2015-10-20 11:52:18 -0500
commit99d18c20b3375c9f314cbbf176e69e35bea8764a (patch)
tree2c31bfa71d492b710e8bf374cbc96259f356d37e
parenteff0192099ab3d5ae4227221371adee87dbb4dee (diff)
downloadFreeBSD-src-99d18c20b3375c9f314cbbf176e69e35bea8764a.zip
FreeBSD-src-99d18c20b3375c9f314cbbf176e69e35bea8764a.tar.gz
MFC r272177:
drop unnecessary ifdef IPSEC's. This file is only compiled when IPSEC is defined... Differential Revision: D839 Reviewed by: bz, glebius, gnn Sponsered by: EuroBSDCon DevSummit TAG: IPSEC-HEAD Issue: #4841
-rw-r--r--sys/netinet/ip_ipsec.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/netinet/ip_ipsec.c b/sys/netinet/ip_ipsec.c
index 1550018..4d428c1 100644
--- a/sys/netinet/ip_ipsec.c
+++ b/sys/netinet/ip_ipsec.c
@@ -61,15 +61,12 @@ __FBSDID("$FreeBSD$");
#include <machine/in_cksum.h>
-#ifdef IPSEC
#include <netipsec/ipsec.h>
#include <netipsec/xform.h>
#include <netipsec/key.h>
-#endif /*IPSEC*/
extern struct protosw inetsw[];
-#ifdef IPSEC
#ifdef IPSEC_FILTERTUNNEL
static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1;
#else
@@ -81,7 +78,6 @@ SYSCTL_DECL(_net_inet_ipsec);
SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, filtertunnel,
CTLFLAG_RW, &VNET_NAME(ip4_ipsec_filtertunnel), 0,
"If set filter packets from an IPsec tunnel.");
-#endif /* IPSEC */
/*
* Check if we have to jump over firewall processing for this packet.
@@ -91,7 +87,6 @@ SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, filtertunnel,
int
ip_ipsec_filtertunnel(struct mbuf *m)
{
-#ifdef IPSEC
/*
* Bypass packet filtering for packets previously handled by IPsec.
@@ -99,7 +94,6 @@ ip_ipsec_filtertunnel(struct mbuf *m)
if (!V_ip4_ipsec_filtertunnel &&
m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL)
return 1;
-#endif
return 0;
}
@@ -112,7 +106,6 @@ ip_ipsec_filtertunnel(struct mbuf *m)
int
ip_ipsec_fwd(struct mbuf *m)
{
-#ifdef IPSEC
struct m_tag *mtag;
struct tdb_ident *tdbi;
struct secpolicy *sp;
@@ -141,7 +134,6 @@ ip_ipsec_fwd(struct mbuf *m)
IPSTAT_INC(ips_cantforward);
return 1;
}
-#endif /* IPSEC */
return 0;
}
@@ -155,7 +147,6 @@ ip_ipsec_fwd(struct mbuf *m)
int
ip_ipsec_input(struct mbuf *m)
{
-#ifdef IPSEC
struct ip *ip = mtod(m, struct ip *);
struct m_tag *mtag;
struct tdb_ident *tdbi;
@@ -196,7 +187,6 @@ ip_ipsec_input(struct mbuf *m)
if (error)
return 1;
}
-#endif /* IPSEC */
return 0;
}
@@ -226,7 +216,6 @@ ip_ipsec_mtu(struct mbuf *m, int mtu)
int
ip_ipsec_output(struct mbuf **m, struct inpcb *inp, int *flags, int *error)
{
-#ifdef IPSEC
struct secpolicy *sp = NULL;
struct tdb_ident *tdbi;
struct m_tag *mtag;
@@ -358,6 +347,4 @@ bad:
if (sp != NULL)
KEY_FREESP(&sp);
return 1;
-#endif /* IPSEC */
- return 0;
}
OpenPOWER on IntegriCloud