]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.0
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / FreeBSD-4.0 / ipv6-patch-4.0
1 .\"     $FreeBSD$
2 .\"
3 *** ip6_input.c.orig    Sun Feb 13 14:32:01 2000
4 --- ip6_input.c Wed Apr 26 22:31:34 2000
5 ***************
6 *** 121,126 ****
7 --- 121,127 ----
8   
9   extern struct domain inet6domain;
10   extern struct ip6protosw inet6sw[];
11 + extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
12   
13   u_char        ip6_protox[IPPROTO_MAX];
14   static int    ip6qmaxlen = IFQ_MAXLEN;
15 ***************
16 *** 302,307 ****
17 --- 303,317 ----
18                 ip6stat.ip6s_badvers++;
19                 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr);
20                 goto bad;
21 +       }
22
23 +       if (fr_checkp) {
24 +               struct  mbuf    *m1 = m;
25
26 +               if ((*fr_checkp)(ip6, sizeof(*ip6), m->m_pkthdr.rcvif,
27 +                                0, &m1) || !m1)
28 +                       return;
29 +               ip6 = mtod(m = m1, struct ip6_hdr *);
30         }
31   
32         ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;
33 *** ip6_output.c.orig   Fri Mar 10 01:57:16 2000
34 --- ip6_output.c        Wed Apr 26 22:34:34 2000
35 ***************
36 *** 108,113 ****
37 --- 108,115 ----
38   #include <netinet6/ip6_fw.h>
39   #endif
40   
41 + extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
42
43   static MALLOC_DEFINE(M_IPMOPTS, "ip6_moptions", "internet multicast options");
44   
45   struct ip6_exthdrs {
46 ***************
47 *** 754,759 ****
48 --- 756,770 ----
49                         ip6->ip6_src.s6_addr16[1] = 0;
50                 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
51                         ip6->ip6_dst.s6_addr16[1] = 0;
52 +       }
53
54 +       if (fr_checkp) {
55 +               struct  mbuf    *m1 = m;
56
57 +               if ((error = (*fr_checkp)(ip6, sizeof(*ip6), ifp, 1, &m1)) ||
58 +                   !m1)
59 +                       goto done;
60 +               ip6 = mtod(m = m1, struct ip6_hdr *);
61         }
62   
63   #ifdef IPV6FIREWALL