Deleted Added
full compact
raw_ip6.c (98211) raw_ip6.c (105194)
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet6/raw_ip6.c 98211 2002-06-14 08:35:21Z hsu $
29 * $FreeBSD: head/sys/netinet6/raw_ip6.c 105194 2002-10-16 01:54:46Z sam $
30 */
31
32/*
33 * Copyright (c) 1982, 1986, 1988, 1993
34 * The Regents of the University of California. All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

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

440 }
441 if (!n)
442 goto bad;
443 p = (u_int16_t *)(mtod(n, caddr_t) + off);
444 *p = 0;
445 *p = in6_cksum(m, ip6->ip6_nxt, sizeof(*ip6), plen);
446 }
447
30 */
31
32/*
33 * Copyright (c) 1982, 1986, 1988, 1993
34 * The Regents of the University of California. All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

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

440 }
441 if (!n)
442 goto bad;
443 p = (u_int16_t *)(mtod(n, caddr_t) + off);
444 *p = 0;
445 *p = in6_cksum(m, ip6->ip6_nxt, sizeof(*ip6), plen);
446 }
447
448#ifdef IPSEC
449 if (ipsec_setsocket(m, so) != 0) {
450 error = ENOBUFS;
451 goto bad;
452 }
453#endif /*IPSEC*/
454
455 error = ip6_output(m, optp, &in6p->in6p_route, 0,
448 error = ip6_output(m, optp, &in6p->in6p_route, 0,
456 in6p->in6p_moptions, &oifp);
449 in6p->in6p_moptions, &oifp, in6p);
457 if (so->so_proto->pr_protocol == IPPROTO_ICMPV6) {
458 if (oifp)
459 icmp6_ifoutstat_inc(oifp, type, code);
460 icmp6stat.icp6s_outhist[type]++;
461 } else
462 rip6stat.rip6s_opackets++;
463
464 goto freectl;

--- 262 unchanged lines hidden ---
450 if (so->so_proto->pr_protocol == IPPROTO_ICMPV6) {
451 if (oifp)
452 icmp6_ifoutstat_inc(oifp, type, code);
453 icmp6stat.icp6s_outhist[type]++;
454 } else
455 rip6stat.rip6s_opackets++;
456
457 goto freectl;

--- 262 unchanged lines hidden ---