]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/FreeBSD-4.0/ipv6-patch-4.1
- 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.1
1 .\"     $FreeBSD$
2 .\"
3 *** ip6_input.c.orig    Sat Jul 15 07:14:34 2000
4 --- ip6_input.c Thu Oct 19 17:14:37 2000
5 ***************
6 *** 120,125 ****
7 --- 120,127 ----
8   
9   extern struct domain inet6domain;
10   extern struct ip6protosw inet6sw[];
11 + extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int,
12 +                            struct mbuf **));
13   
14   u_char ip6_protox[IPPROTO_MAX];
15   static int ip6qmaxlen = IFQ_MAXLEN;
16 ***************
17 *** 289,294 ****
18 --- 291,305 ----
19                 ip6stat.ip6s_badvers++;
20                 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr);
21                 goto bad;
22 +       }
23
24 +       if (fr_checkp) {
25 +               struct  mbuf    *m1 = m;
26
27 +               if ((*fr_checkp)(ip6, sizeof(*ip6), m->m_pkthdr.rcvif,
28 +                                0, &m1) || !m1)
29 +                       return;
30 +               ip6 = mtod(m = m1, struct ip6_hdr *);
31         }
32   
33         ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;
34
35 *** ip6_output.c.orig   Sat Jul 15 07:14:35 2000
36 --- ip6_output.c        Thu Oct 19 17:13:53 2000
37 ***************
38 *** 106,111 ****
39 --- 106,113 ----
40   #include <netinet6/ip6_fw.h>
41   #endif
42   
43 + extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf **));
44
45   static MALLOC_DEFINE(M_IPMOPTS, "ip6_moptions", "internet multicast options");
46   
47   struct ip6_exthdrs {
48 ***************
49 *** 787,792 ****
50 --- 789,803 ----
51                         ip6->ip6_src.s6_addr16[1] = 0;
52                 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
53                         ip6->ip6_dst.s6_addr16[1] = 0;
54 +       }
55
56 +       if (fr_checkp) {
57 +               struct  mbuf    *m1 = m;
58
59 +               if ((error = (*fr_checkp)(ip6, sizeof(*ip6), ifp, 1, &m1)) ||
60 +                   !m1)
61 +                       goto done;
62 +               ip6 = mtod(m = m1, struct ip6_hdr *);
63         }
64   
65   #ifdef IPV6FIREWALL