version 1.93.2.5, 2001/02/11 19:17:14 |
version 1.125, 2000/12/25 02:00:47 |
|
|
|
|
#ifdef PFIL_HOOKS |
#ifdef PFIL_HOOKS |
/* Register our Packet Filter hook. */ |
/* Register our Packet Filter hook. */ |
inet_pfil_hook.ph_type = PFIL_TYPE_AF; |
inet_pfil_hook.ph_key = (void *)(u_long) AF_INET; |
inet_pfil_hook.ph_af = AF_INET; |
inet_pfil_hook.ph_dlt = DLT_RAW; |
i = pfil_head_register(&inet_pfil_hook); |
i = pfil_head_register(&inet_pfil_hook); |
if (i != 0) |
if (i != 0) |
printf("ip_init: WARNING: unable to register pfil hook, " |
printf("ip_init: WARNING: unable to register pfil hook, " |
Line 471 ip_input(struct mbuf *m) |
|
Line 471 ip_input(struct mbuf *m) |
|
* 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. |
*/ |
*/ |
/* |
if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, |
* let ipfilter look at packet on the wire, |
PFIL_IN) != 0) |
* not the decapsulated packet. |
|
*/ |
|
#ifdef IPSEC |
|
if (!ipsec_gethist(m, NULL)) |
|
#else |
|
if (1) |
|
#endif |
|
{ |
|
if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, |
|
PFIL_IN) != 0) |
|
return; |
return; |
if (m == NULL) |
if (m == NULL) |
return; |
return; |
ip = mtod(m, struct ip *); |
ip = mtod(m, struct ip *); |
} |
|
#endif /* PFIL_HOOKS */ |
#endif /* PFIL_HOOKS */ |
|
|
#ifdef ALTQ |
#ifdef ALTQ |
Line 1463 ip_forward(m, srcrt) |
|
Line 1452 ip_forward(m, srcrt) |
|
|
|
#ifdef IPSEC |
#ifdef IPSEC |
/* Don't lookup socket in forwading case */ |
/* Don't lookup socket in forwading case */ |
(void)ipsec_setsocket(m, NULL); |
ipsec_setsocket(m, NULL); |
#endif |
#endif |
error = ip_output(m, (struct mbuf *)0, &ipforward_rt, |
error = ip_output(m, (struct mbuf *)0, &ipforward_rt, |
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)), 0); |
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)), 0); |