| version 1.28, 2000/10/23 03:45:25 |
version 1.29, 2000/11/11 00:52:39 |
| Line 140 ip6_fw_chk_t *ip6_fw_chk_ptr; |
|
| Line 140 ip6_fw_chk_t *ip6_fw_chk_ptr; |
|
| ip6_fw_ctl_t *ip6_fw_ctl_ptr; |
ip6_fw_ctl_t *ip6_fw_ctl_ptr; |
| #endif |
#endif |
| |
|
| |
#ifdef PFIL_HOOKS |
| |
struct pfil_head inet6_pfil_hook; |
| |
#endif |
| |
|
| struct ip6stat ip6stat; |
struct ip6stat ip6stat; |
| |
|
| static void ip6_init2 __P((void *)); |
static void ip6_init2 __P((void *)); |
|
|
| ip6_flow_seq = random() ^ tv.tv_usec; |
ip6_flow_seq = random() ^ tv.tv_usec; |
| |
|
| ip6_init2((void *)0); |
ip6_init2((void *)0); |
| |
|
| |
#ifdef PFIL_HOOKS |
| |
/* Register our Packet Filter hook. */ |
| |
inet6_pfil_hook.ph_key = (void *)(u_long) AF_INET6; |
| |
inet6_pfil_hook.ph_dlt = DLT_RAW; |
| |
i = pfil_head_register(&inet6_pfil_hook); |
| |
if (i != 0) |
| |
printf("ip6_init: WARNING: unable to register pfil hook, " |
| |
"error %d\n", i); |
| |
#endif /* PFIL_HOOKS */ |
| } |
} |
| |
|
| static void |
static void |
|
|
| u_int32_t rtalert = ~0; |
u_int32_t rtalert = ~0; |
| int nxt, ours = 0; |
int nxt, ours = 0; |
| struct ifnet *deliverifp = NULL; |
struct ifnet *deliverifp = NULL; |
| #ifdef PFIL_HOOKS |
|
| struct packet_filter_hook *pfh; |
|
| struct mbuf *m0; |
|
| int rv; |
|
| #endif /* PFIL_HOOKS */ |
|
| |
|
| #ifdef IPSEC |
#ifdef IPSEC |
| /* |
/* |
|
|
| * Note that filters must _never_ set this flag, as another filter |
* Note that filters must _never_ set this flag, as another filter |
| * in the list may have previously cleared it. |
* in the list may have previously cleared it. |
| */ |
*/ |
| m0 = m; |
if (pfil_run_hooks(&inet6_pfil_hook, &m, m->m_pkthdr.rcvif, |
| pfh = pfil_hook_get(PFIL_IN, &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh); |
PFIL_IN) != 0) |
| for (; pfh; pfh = pfh->pfil_link.tqe_next) |
return; |
| if (pfh->pfil_func) { |
if (m == NULL) |
| rv = pfh->pfil_func(ip6, sizeof(*ip6), |
return; |
| m->m_pkthdr.rcvif, 0, &m0); |
ip6 = mtod(m, struct ip6_hdr *); |
| if (rv) |
|
| return; |
|
| m = m0; |
|
| if (m == NULL) |
|
| return; |
|
| ip6 = mtod(m, struct ip6_hdr *); |
|
| } |
|
| #endif /* PFIL_HOOKS */ |
#endif /* PFIL_HOOKS */ |
| |
|
| |
|