summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_proto.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-10-19 21:14:57 +0000
committerandre <andre@FreeBSD.org>2004-10-19 21:14:57 +0000
commit9f43dad9fc6c03f7de0b8524d64fa3cdac16bd58 (patch)
treecdb937a58e5fb1c4e6d3074c04eadefb30ae7251 /sys/netinet/in_proto.c
parent40693cc7d92c8317aac4b7e774996bf54b3d79f9 (diff)
downloadFreeBSD-src-9f43dad9fc6c03f7de0b8524d64fa3cdac16bd58.zip
FreeBSD-src-9f43dad9fc6c03f7de0b8524d64fa3cdac16bd58.tar.gz
Convert IPDIVERT into a loadable module. This makes use of the dynamic loadability
of protocols. The call to divert_packet() is done through a function pointer. All semantics of IPDIVERT remain intact. If IPDIVERT is not loaded ipfw will refuse to install divert rules and natd will complain about 'protocol not supported'. Once it is loaded both will work and accept rules and open the divert socket. The module can only be unloaded if no divert sockets are open. It does not close any divert sockets when an unload is requested but will return EBUSY instead.
Diffstat (limited to 'sys/netinet/in_proto.c')
-rw-r--r--sys/netinet/in_proto.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index 8e8279d..a9158bf 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -30,7 +30,6 @@
* $FreeBSD$
*/
-#include "opt_ipdivert.h"
#include "opt_ipx.h"
#include "opt_mrouting.h"
#include "opt_ipsec.h"
@@ -54,7 +53,6 @@
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/ip_icmp.h>
-#include <netinet/ip_divert.h>
#include <netinet/igmp_var.h>
#ifdef PIM
#include <netinet/pim_var.h>
@@ -215,14 +213,6 @@ struct protosw inetsw[] = {
&rip_usrreqs
},
#endif
-#ifdef IPDIVERT
-{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
- div_input, 0, div_ctlinput, ip_ctloutput,
- 0,
- div_init, 0, 0, 0,
- &div_usrreqs,
-},
-#endif
#ifdef IPXIP
{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR|PR_LASTHDR,
ipxip_input, 0, ipxip_ctlinput, 0,
@@ -297,9 +287,6 @@ SYSCTL_NODE(_net_inet, IPPROTO_AH, ipsec, CTLFLAG_RW, 0, "IPSEC");
#endif /* IPSEC */
#endif /* !FAST_IPSEC */
SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW");
-#ifdef IPDIVERT
-SYSCTL_NODE(_net_inet, IPPROTO_DIVERT, divert, CTLFLAG_RW, 0, "DIVERT");
-#endif
#ifdef PIM
SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
#endif
OpenPOWER on IntegriCloud