Deleted Added
full compact
ip_fw2.c (136075) ip_fw2.c (136714)
1/*
2 * Copyright (c) 2002 Luigi Rizzo, Universita` di Pisa
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
1/*
2 * Copyright (c) 2002 Luigi Rizzo, Universita` di Pisa
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/netinet/ip_fw2.c 136075 2004-10-03 00:47:15Z green $
25 * $FreeBSD: head/sys/netinet/ip_fw2.c 136714 2004-10-19 21:14:57Z andre $
26 */
27
28#define DEB(x)
29#define DDB(x) x
30
31/*
32 * Implement IP packet firewall (new version)
33 */
34
35#if !defined(KLD_MODULE)
36#include "opt_ipfw.h"
37#include "opt_ipdn.h"
26 */
27
28#define DEB(x)
29#define DDB(x) x
30
31/*
32 * Implement IP packet firewall (new version)
33 */
34
35#if !defined(KLD_MODULE)
36#include "opt_ipfw.h"
37#include "opt_ipdn.h"
38#include "opt_ipdivert.h"
39#include "opt_inet.h"
40#include "opt_ipsec.h"
41#ifndef INET
42#error IPFIREWALL requires INET.
43#endif /* INET */
44#endif
45
46#define IPFW2 1

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

3072 goto bad_size;
3073 goto check_action;
3074#else
3075 return EINVAL;
3076#endif
3077
3078 case O_DIVERT:
3079 case O_TEE:
38#include "opt_inet.h"
39#include "opt_ipsec.h"
40#ifndef INET
41#error IPFIREWALL requires INET.
42#endif /* INET */
43#endif
44
45#define IPFW2 1

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

3071 goto bad_size;
3072 goto check_action;
3073#else
3074 return EINVAL;
3075#endif
3076
3077 case O_DIVERT:
3078 case O_TEE:
3080#ifndef IPDIVERT
3081 return EINVAL;
3082#endif
3079 if (ip_divert_ptr == NULL)
3080 return EINVAL;
3083 case O_FORWARD_MAC: /* XXX not implemented yet */
3084 case O_CHECK_STATE:
3085 case O_COUNT:
3086 case O_ACCEPT:
3087 case O_DENY:
3088 case O_REJECT:
3089 case O_SKIPTO:
3090 if (cmdlen != F_INSN_SIZE(ipfw_insn))

--- 469 unchanged lines hidden ---
3081 case O_FORWARD_MAC: /* XXX not implemented yet */
3082 case O_CHECK_STATE:
3083 case O_COUNT:
3084 case O_ACCEPT:
3085 case O_DENY:
3086 case O_REJECT:
3087 case O_SKIPTO:
3088 if (cmdlen != F_INSN_SIZE(ipfw_insn))

--- 469 unchanged lines hidden ---