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 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
448 error = ip6_output(m, optp, &in6p->in6p_route, 0,
449 in6p->in6p_moptions, &oifp, in6p);
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 ---
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 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
448 error = ip6_output(m, optp, &in6p->in6p_route, 0,
449 in6p->in6p_moptions, &oifp, in6p);
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 ---