Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.46.2.2 retrieving revision 1.46.2.3 diff -u -p -r1.46.2.2 -r1.46.2.3 --- src/sys/netinet/raw_ip.c 2001/02/11 19:17:17 1.46.2.2 +++ src/sys/netinet/raw_ip.c 2001/03/12 13:31:51 1.46.2.3 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.46.2.2 2001/02/11 19:17:17 bouyer Exp $ */ +/* $NetBSD: raw_ip.c,v 1.46.2.3 2001/03/12 13:31:51 bouyer Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -175,6 +175,14 @@ rip_input(m, va_alist) continue; if (last) { struct mbuf *n; + +#ifdef IPSEC + /* check AH/ESP integrity. */ + if (ipsec4_in_reject_so(m, last->inp_socket)) { + ipsecstat.in_polvio++; + /* do not inject data to pcb */ + } else +#endif /*IPSEC*/ if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { if (last->inp_flags & INP_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP) @@ -192,6 +200,15 @@ rip_input(m, va_alist) } last = inp; } +#ifdef IPSEC + /* check AH/ESP integrity. */ + if (last && ipsec4_in_reject_so(m, last->inp_socket)) { + m_freem(m); + ipsecstat.in_polvio++; + ipstat.ips_delivered--; + /* do not inject data to pcb */ + } else +#endif /*IPSEC*/ if (last) { if (last->inp_flags & INP_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP)