Deleted Added
sdiff udiff text old ( 266800 ) new ( 269699 )
full compact
1/* $FreeBSD: head/sys/netipsec/ipsec_input.c 266800 2014-05-28 12:45:27Z vanhu $ */
2/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */
3/*-
4 * The authors of this code are John Ioannidis (ji@tla.org),
5 * Angelos D. Keromytis (kermit@csd.uch.gr) and
6 * Niels Provos (provos@physnet.uni-hamburg.de).
7 *
8 * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
9 * in November 1995.

--- 239 unchanged lines hidden (view full) ---

249 off = va_arg(ap, int);
250 nxt = va_arg(ap, int);
251 va_end(ap);
252
253 return ipsec_common_input(m, off, offsetof(struct ip, ip_p),
254 AF_INET, nxt);
255}
256
257void
258ah4_input(struct mbuf *m, int off)
259{
260 ipsec4_common_input(m, off, IPPROTO_AH);
261}
262void
263ah4_ctlinput(int cmd, struct sockaddr *sa, void *v)
264{
265 if (sa->sa_family == AF_INET &&
266 sa->sa_len == sizeof(struct sockaddr_in))
267 ipsec4_common_ctlinput(cmd, sa, v, IPPROTO_AH);
268}
269
270void
271esp4_input(struct mbuf *m, int off)
272{
273 ipsec4_common_input(m, off, IPPROTO_ESP);
274}
275void
276esp4_ctlinput(int cmd, struct sockaddr *sa, void *v)
277{
278 if (sa->sa_family == AF_INET &&
279 sa->sa_len == sizeof(struct sockaddr_in))
280 ipsec4_common_ctlinput(cmd, sa, v, IPPROTO_ESP);
281}
282
283void
284ipcomp4_input(struct mbuf *m, int off)
285{
286 ipsec4_common_input(m, off, IPPROTO_IPCOMP);
287}
288
289/*
290 * IPsec input callback for INET protocols.
291 * This routine is called as the transform callback.
292 * Takes care of filtering and other sanity checks on
293 * the processed packet.
294 */

--- 619 unchanged lines hidden ---