Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / ipfilter / FreeBSD / ip_output.c.diffs
1 *** /sys/netinet/ip_output.c.orig       Thu Oct 24 22:27:28 1996
2 --- /sys/netinet/ip_output.c    Tue Feb 18 21:38:23 1997
3 ***************
4 *** 65,70 ****
5 --- 65,74 ----
6   static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
7   static void ip_mloopback
8         __P((struct ifnet *, struct mbuf *, struct sockaddr_in *));
9 + #if defined(IPFILTER_LKM) || defined(IPFILTER)
10 + extern int fr_check __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
11 + extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
12 + #endif
13   
14   /*
15    * IP output.  The packet in mbuf chain m contains a skeletal IP
16 ***************
17 *** 330,335 ****
18 --- 334,351 ----
19                 m->m_flags &= ~M_BCAST;
20   
21   sendit:
22 + #if defined(IPFILTER) || defined(IPFILTER_LKM)
23 +       /*
24 +        * looks like most checking has been done now...do a filter check
25 +        */
26 +       if (fr_checkp) {
27 +               struct  mbuf    *m1 = m;
28
29 +               if ((error = (*fr_checkp)(ip, hlen, ifp, 1, &m1)) || !m1)
30 +                       goto done;
31 +               ip = mtod(m = m1, struct ip *);
32 +           }
33 + #endif
34         /*
35          * Check with the firewall...
36          */