| version 1.105, 2008/04/12 05:58:22 |
version 1.105.2.1, 2008/05/18 12:35:29 |
| Line 97 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| Line 97 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| |
|
| #ifdef IPSEC |
#ifdef IPSEC |
| #include <netinet6/ipsec.h> |
#include <netinet6/ipsec.h> |
| #endif /*IPSEC*/ |
#include <netinet6/ipsec_private.h> |
| |
#endif /* IPSEC */ |
| |
|
| #ifdef FAST_IPSEC |
#ifdef FAST_IPSEC |
| #include <netipsec/ipsec.h> |
#include <netipsec/ipsec.h> |
| #include <netipsec/ipsec_var.h> /* XXX ipsecstat namespace */ |
#include <netipsec/ipsec_var.h> |
| #endif /* FAST_IPSEC*/ |
#include <netipsec/ipsec_private.h> |
| |
#endif /* FAST_IPSEC */ |
| |
|
| struct inpcbtable rawcbtable; |
struct inpcbtable rawcbtable; |
| |
|
| Line 200 rip_input(struct mbuf *m, ...) |
|
| Line 202 rip_input(struct mbuf *m, ...) |
|
| #if defined(IPSEC) || defined(FAST_IPSEC) |
#if defined(IPSEC) || defined(FAST_IPSEC) |
| /* check AH/ESP integrity. */ |
/* check AH/ESP integrity. */ |
| else if (ipsec4_in_reject_so(m, last->inp_socket)) { |
else if (ipsec4_in_reject_so(m, last->inp_socket)) { |
| ipsecstat.in_polvio++; |
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO); |
| /* do not inject data to pcb */ |
/* do not inject data to pcb */ |
| } |
} |
| #endif /*IPSEC*/ |
#endif /*IPSEC*/ |
| Line 215 rip_input(struct mbuf *m, ...) |
|
| Line 217 rip_input(struct mbuf *m, ...) |
|
| /* check AH/ESP integrity. */ |
/* check AH/ESP integrity. */ |
| if (last != NULL && ipsec4_in_reject_so(m, last->inp_socket)) { |
if (last != NULL && ipsec4_in_reject_so(m, last->inp_socket)) { |
| m_freem(m); |
m_freem(m); |
| ipsecstat.in_polvio++; |
IPSEC_STATINC(IPSEC_STAT_IN_POLVIO); |
| IP_STATDEC(IP_STAT_DELIVERED); |
IP_STATDEC(IP_STAT_DELIVERED); |
| /* do not inject data to pcb */ |
/* do not inject data to pcb */ |
| } else |
} else |
| Line 526 rip_usrreq(struct socket *so, int req, |
|
| Line 528 rip_usrreq(struct socket *so, int req, |
|
| s = splsoftnet(); |
s = splsoftnet(); |
| |
|
| if (req == PRU_PURGEIF) { |
if (req == PRU_PURGEIF) { |
| |
mutex_enter(softnet_lock); |
| in_pcbpurgeif0(&rawcbtable, (struct ifnet *)control); |
in_pcbpurgeif0(&rawcbtable, (struct ifnet *)control); |
| in_purgeif((struct ifnet *)control); |
in_purgeif((struct ifnet *)control); |
| in_pcbpurgeif(&rawcbtable, (struct ifnet *)control); |
in_pcbpurgeif(&rawcbtable, (struct ifnet *)control); |
| |
mutex_exit(softnet_lock); |
| splx(s); |
splx(s); |
| return (0); |
return (0); |
| } |
} |
| Line 546 rip_usrreq(struct socket *so, int req, |
|
| Line 550 rip_usrreq(struct socket *so, int req, |
|
| switch (req) { |
switch (req) { |
| |
|
| case PRU_ATTACH: |
case PRU_ATTACH: |
| |
sosetlock(so); |
| if (inp != 0) { |
if (inp != 0) { |
| error = EISCONN; |
error = EISCONN; |
| break; |
break; |