Deleted Added
full compact
fil.c (355795) fil.c (363769)
1/* $FreeBSD: stable/11/sys/contrib/ipfilter/netinet/fil.c 355795 2019-12-16 02:38:47Z cy $ */
1/* $FreeBSD: stable/11/sys/contrib/ipfilter/netinet/fil.c 363769 2020-08-02 04:25:36Z cy $ */
2
3/*
4 * Copyright (C) 2012 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 *
8 * Copyright 2008 Sun Microsystems.
9 *

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

99#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
100# include <sys/callout.h>
101extern struct callout ipf_slowtimer_ch;
102#endif
103/* END OF INCLUDES */
104
105#if !defined(lint)
106static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
2
3/*
4 * Copyright (C) 2012 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 *
8 * Copyright 2008 Sun Microsystems.
9 *

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

99#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
100# include <sys/callout.h>
101extern struct callout ipf_slowtimer_ch;
102#endif
103/* END OF INCLUDES */
104
105#if !defined(lint)
106static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
107static const char rcsid[] = "@(#)$FreeBSD: stable/11/sys/contrib/ipfilter/netinet/fil.c 355795 2019-12-16 02:38:47Z cy $";
107static const char rcsid[] = "@(#)$FreeBSD: stable/11/sys/contrib/ipfilter/netinet/fil.c 363769 2020-08-02 04:25:36Z cy $";
108/* static const char rcsid[] = "@(#)$Id: fil.c,v 2.243.2.125 2007/10/10 09:27:20 darrenr Exp $"; */
109#endif
110
111#ifndef _KERNEL
112# include "ipf.h"
113# include "ipt.h"
114extern int opts;
115extern int blockreason;
116#endif /* _KERNEL */
117
108/* static const char rcsid[] = "@(#)$Id: fil.c,v 2.243.2.125 2007/10/10 09:27:20 darrenr Exp $"; */
109#endif
110
111#ifndef _KERNEL
112# include "ipf.h"
113# include "ipt.h"
114extern int opts;
115extern int blockreason;
116#endif /* _KERNEL */
117
118#define FASTROUTE_RECURSION
119
118#define LBUMP(x) softc->x++
119#define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0)
120
121static INLINE int ipf_check_ipf __P((fr_info_t *, frentry_t *, int));
122static u_32_t ipf_checkcipso __P((fr_info_t *, u_char *, int));
123static u_32_t ipf_checkripso __P((u_char *));
124static u_32_t ipf_decaps __P((fr_info_t *, u_32_t, int));
125#ifdef IPFILTER_LOG

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

1691 fi = &fin->fin_fi;
1692 hlen = fin->fin_hlen;
1693
1694 ip = fin->fin_ip;
1695 p = ip->ip_p;
1696 fi->fi_p = p;
1697 fin->fin_crc = p;
1698 fi->fi_tos = ip->ip_tos;
120#define LBUMP(x) softc->x++
121#define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0)
122
123static INLINE int ipf_check_ipf __P((fr_info_t *, frentry_t *, int));
124static u_32_t ipf_checkcipso __P((fr_info_t *, u_char *, int));
125static u_32_t ipf_checkripso __P((u_char *));
126static u_32_t ipf_decaps __P((fr_info_t *, u_32_t, int));
127#ifdef IPFILTER_LOG

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

1693 fi = &fin->fin_fi;
1694 hlen = fin->fin_hlen;
1695
1696 ip = fin->fin_ip;
1697 p = ip->ip_p;
1698 fi->fi_p = p;
1699 fin->fin_crc = p;
1700 fi->fi_tos = ip->ip_tos;
1699 fin->fin_id = ip->ip_id;
1701 fin->fin_id = ntohs(ip->ip_id);
1700 off = ntohs(ip->ip_off);
1701
1702 /* Get both TTL and protocol */
1703 fi->fi_p = ip->ip_p;
1704 fi->fi_ttl = ip->ip_ttl;
1705
1706 /* Zero out bits not used in IPv6 address */
1707 fi->fi_src.i6[1] = 0;

--- 8570 unchanged lines hidden ---
1702 off = ntohs(ip->ip_off);
1703
1704 /* Get both TTL and protocol */
1705 fi->fi_p = ip->ip_p;
1706 fi->fi_ttl = ip->ip_ttl;
1707
1708 /* Zero out bits not used in IPv6 address */
1709 fi->fi_src.i6[1] = 0;

--- 8570 unchanged lines hidden ---