Deleted Added
full compact
ip_divert.c (160491) ip_divert.c (163606)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet/ip_divert.c 160491 2006-07-18 22:34:27Z ups $
29 * $FreeBSD: head/sys/netinet/ip_divert.c 163606 2006-10-22 11:52:19Z rwatson $
30 */
31
32#if !defined(KLD_MODULE)
33#include "opt_inet.h"
34#include "opt_ipfw.h"
35#include "opt_mac.h"
36#ifndef INET
37#error "IPDIVERT requires INET."
38#endif
39#ifndef IPFIREWALL
40#error "IPDIVERT requires IPFIREWALL"
41#endif
42#endif
43
44#include <sys/param.h>
45#include <sys/kernel.h>
46#include <sys/lock.h>
47#include <sys/malloc.h>
30 */
31
32#if !defined(KLD_MODULE)
33#include "opt_inet.h"
34#include "opt_ipfw.h"
35#include "opt_mac.h"
36#ifndef INET
37#error "IPDIVERT requires INET."
38#endif
39#ifndef IPFIREWALL
40#error "IPDIVERT requires IPFIREWALL"
41#endif
42#endif
43
44#include <sys/param.h>
45#include <sys/kernel.h>
46#include <sys/lock.h>
47#include <sys/malloc.h>
48#include <sys/mac.h>
49#include <sys/mbuf.h>
50#include <sys/module.h>
51#include <sys/kernel.h>
52#include <sys/proc.h>
53#include <sys/protosw.h>
54#include <sys/signalvar.h>
55#include <sys/socket.h>
56#include <sys/socketvar.h>

--- 10 unchanged lines hidden (view full) ---

67#include <netinet/in_pcb.h>
68#include <netinet/in_systm.h>
69#include <netinet/in_var.h>
70#include <netinet/ip.h>
71#include <netinet/ip_divert.h>
72#include <netinet/ip_var.h>
73#include <netinet/ip_fw.h>
74
48#include <sys/mbuf.h>
49#include <sys/module.h>
50#include <sys/kernel.h>
51#include <sys/proc.h>
52#include <sys/protosw.h>
53#include <sys/signalvar.h>
54#include <sys/socket.h>
55#include <sys/socketvar.h>

--- 10 unchanged lines hidden (view full) ---

66#include <netinet/in_pcb.h>
67#include <netinet/in_systm.h>
68#include <netinet/in_var.h>
69#include <netinet/ip.h>
70#include <netinet/ip_divert.h>
71#include <netinet/ip_var.h>
72#include <netinet/ip_fw.h>
73
74#include <security/mac/mac_framework.h>
75
75/*
76 * Divert sockets
77 */
78
79/*
80 * Allocate enough space to hold a full IP packet
81 */
82#define DIVSNDQ (65536 + 100)

--- 649 unchanged lines hidden ---
76/*
77 * Divert sockets
78 */
79
80/*
81 * Allocate enough space to hold a full IP packet
82 */
83#define DIVSNDQ (65536 + 100)

--- 649 unchanged lines hidden ---