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