Deleted Added
full compact
xform_ipip.c (108172) xform_ipip.c (109623)
1/* $FreeBSD: head/sys/netipsec/xform_ipip.c 108172 2002-12-22 05:35:03Z hsu $ */
1/* $FreeBSD: head/sys/netipsec/xform_ipip.c 109623 2003-01-21 08:56:16Z alfred $ */
2/* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun 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 * The original version of this code was written by John Ioannidis
9 * for BSD/OS in Athens, Greece, in November 1995.

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

436 "address in SA %s/%08lx\n",
437 ipsec_address(&saidx->dst),
438 (u_long) ntohl(sav->spi)));
439 ipipstat.ipips_unspec++;
440 error = EINVAL;
441 goto bad;
442 }
443
2/* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun 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 * The original version of this code was written by John Ioannidis
9 * for BSD/OS in Athens, Greece, in November 1995.

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

436 "address in SA %s/%08lx\n",
437 ipsec_address(&saidx->dst),
438 (u_long) ntohl(sav->spi)));
439 ipipstat.ipips_unspec++;
440 error = EINVAL;
441 goto bad;
442 }
443
444 M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
444 M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
445 if (m == 0) {
446 DPRINTF(("ipip_output: M_PREPEND failed\n"));
447 ipipstat.ipips_hdrops++;
448 error = ENOBUFS;
449 goto bad;
450 }
451
452 ipo = mtod(m, struct ip *);

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

524
525 /* scoped address handling */
526 ip6 = mtod(m, struct ip6_hdr *);
527 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src))
528 ip6->ip6_src.s6_addr16[1] = 0;
529 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
530 ip6->ip6_dst.s6_addr16[1] = 0;
531
445 if (m == 0) {
446 DPRINTF(("ipip_output: M_PREPEND failed\n"));
447 ipipstat.ipips_hdrops++;
448 error = ENOBUFS;
449 goto bad;
450 }
451
452 ipo = mtod(m, struct ip *);

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

524
525 /* scoped address handling */
526 ip6 = mtod(m, struct ip6_hdr *);
527 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src))
528 ip6->ip6_src.s6_addr16[1] = 0;
529 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
530 ip6->ip6_dst.s6_addr16[1] = 0;
531
532 M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);
532 M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT);
533 if (m == 0) {
534 DPRINTF(("ipip_output: M_PREPEND failed\n"));
535 ipipstat.ipips_hdrops++;
536 *mp = NULL;
537 error = ENOBUFS;
538 goto bad;
539 }
540

--- 163 unchanged lines hidden ---
533 if (m == 0) {
534 DPRINTF(("ipip_output: M_PREPEND failed\n"));
535 ipipstat.ipips_hdrops++;
536 *mp = NULL;
537 error = ENOBUFS;
538 goto bad;
539 }
540

--- 163 unchanged lines hidden ---