summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2001-09-25 18:40:52 +0000
committerbrooks <brooks@FreeBSD.org>2001-09-25 18:40:52 +0000
commit74063dd723dfad807cddf4ebc4e8bec0a0400b08 (patch)
tree047925a0cd0ed3cd9eac86164bb29b8242a91c33 /sys/netinet
parent7f833143d714e030ab2c3c5e75763673067276e3 (diff)
downloadFreeBSD-src-74063dd723dfad807cddf4ebc4e8bec0a0400b08.zip
FreeBSD-src-74063dd723dfad807cddf4ebc4e8bec0a0400b08.tar.gz
Make faith loadable, unloadable, and clonable.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c4
-rw-r--r--sys/netinet/ip_icmp.c8
-rw-r--r--sys/netinet/ip_input.c10
-rw-r--r--sys/netinet/ip_output.c10
4 files changed, 4 insertions, 28 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 0b54024..1db834c 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -67,8 +67,6 @@
#include <netinet6/ip6_var.h>
#endif /* INET6 */
-#include "faith.h"
-
#ifdef IPSEC
#include <netinet6/ipsec.h>
#include <netkey/key.h>
@@ -919,11 +917,9 @@ in_pcblookup_hash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard,
#endif
if (inp->inp_faddr.s_addr == INADDR_ANY &&
inp->inp_lport == lport) {
-#if defined(NFAITH) && NFAITH > 0
if (ifp && ifp->if_type == IFT_FAITH &&
(inp->inp_flags & INP_FAITH) == 0)
continue;
-#endif
if (inp->inp_laddr.s_addr == laddr.s_addr)
return (inp);
else if (inp->inp_laddr.s_addr == INADDR_ANY) {
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index ac38d9d..5664516 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -46,6 +46,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
+#include <net/if_types.h>
#include <net/route.h>
#define _IP_VHL
@@ -62,11 +63,6 @@
#include <netkey/key.h>
#endif
-#include "faith.h"
-#if defined(NFAITH) && NFAITH > 0
-#include <net/if_types.h>
-#endif
-
#include <machine/in_cksum.h>
/*
@@ -275,7 +271,6 @@ icmp_input(m, off)
m->m_len += hlen;
m->m_data -= hlen;
-#if defined(NFAITH) && 0 < NFAITH
if (m->m_pkthdr.rcvif && m->m_pkthdr.rcvif->if_type == IFT_FAITH) {
/*
* Deliver very specific ICMP type only.
@@ -288,7 +283,6 @@ icmp_input(m, off)
goto freeit;
}
}
-#endif
#ifdef ICMPPRINTFS
if (icmpprintfs)
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 69eb78d..d80c7d4 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -60,6 +60,7 @@
#include <net/pfil.h>
#include <net/if.h>
+#include <net/if_types.h>
#include <net/if_var.h>
#include <net/if_dl.h>
#include <net/route.h>
@@ -84,11 +85,6 @@
#include <netkey/key.h>
#endif
-#include "faith.h"
-#if defined(NFAITH) && NFAITH > 0
-#include <net/if_types.h>
-#endif
-
#ifdef DUMMYNET
#include <netinet/ip_dummynet.h>
#endif
@@ -557,6 +553,7 @@ pass:
* the packets are received.
*/
checkif = ip_checkinterface && (ipforwarding == 0) &&
+ m->m_pkthdr.rcvif != NULL &&
((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) &&
(ip_fw_fwd_addr == NULL);
@@ -634,7 +631,6 @@ pass:
if (ip->ip_dst.s_addr == INADDR_ANY)
goto ours;
-#if defined(NFAITH) && 0 < NFAITH
/*
* FAITH(Firewall Aided Internet Translator)
*/
@@ -646,7 +642,7 @@ pass:
m_freem(m);
return;
}
-#endif
+
/*
* Not for us; forward if possible and desirable.
*/
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 86b321e..bd09521 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -63,8 +63,6 @@
#include <netinet/in_var.h>
#include <netinet/ip_var.h>
-#include "faith.h"
-
#include <machine/in_cksum.h>
static MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options");
@@ -1166,9 +1164,7 @@ ip_ctloutput(so, sopt)
case IP_RECVRETOPTS:
case IP_RECVDSTADDR:
case IP_RECVIF:
-#if defined(NFAITH) && NFAITH > 0
case IP_FAITH:
-#endif
error = sooptcopyin(sopt, &optval, sizeof optval,
sizeof optval);
if (error)
@@ -1204,11 +1200,9 @@ ip_ctloutput(so, sopt)
OPTSET(INP_RECVIF);
break;
-#if defined(NFAITH) && NFAITH > 0
case IP_FAITH:
OPTSET(INP_FAITH);
break;
-#endif
}
break;
#undef OPTSET
@@ -1300,9 +1294,7 @@ ip_ctloutput(so, sopt)
case IP_RECVDSTADDR:
case IP_RECVIF:
case IP_PORTRANGE:
-#if defined(NFAITH) && NFAITH > 0
case IP_FAITH:
-#endif
switch (sopt->sopt_name) {
case IP_TOS:
@@ -1340,11 +1332,9 @@ ip_ctloutput(so, sopt)
optval = 0;
break;
-#if defined(NFAITH) && NFAITH > 0
case IP_FAITH:
optval = OPTBIT(INP_FAITH);
break;
-#endif
}
error = sooptcopyout(sopt, &optval, sizeof optval);
break;
OpenPOWER on IntegriCloud