summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/FreeBSD-2.2/ip_input.c.diffs
blob: c2b2b15301ce142bdca8f949c7910e76808ee67f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*** /sys/netinet/ip_input.c.orig	Sat May 24 13:37:16 1997
--- /sys/netinet/ip_input.c	Sat May 24 13:38:58 1997
***************
*** 74,79 ****
--- 74,82 ----
  #ifdef IPFIREWALL
  #include <netinet/ip_fw.h>
  #endif
+ #if defined(IPFILTER_LKM) || defined(IPFILTER)
+ int	(*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
+ #endif
  
  int rsvp_on = 0;
  static int ip_rsvp_on;
***************
*** 310,315 ****
--- 313,327 ----
  	 * - Wrap: fake packet's addr/port <unimpl.>
  	 * - Encapsulate: put it in another IP and send out. <unimp.>
   	 */
+ #if defined(IPFILTER_LKM) || defined(IPFILTER)
+ 	if (fr_checkp) {
+ 		struct mbuf *m1 = m;
+ 
+ 		if ((*fr_checkp)(ip, hlen, m->m_pkthdr.rcvif, 0, &m1) || !m1)
+ 			return;
+ 		ip = mtod(m = m1, struct ip *);
+ 	}
+ #endif
  
  #ifdef COMPAT_IPFW
  	if (ip_fw_chk_ptr) {
OpenPOWER on IntegriCloud