icmp6.c (54952) | icmp6.c (55009) |
---|---|
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/icmp6.c 54952 1999-12-21 11:14:12Z eivind $ | 29 * $FreeBSD: head/sys/netinet6/icmp6.c 55009 1999-12-22 19:13:38Z shin $ |
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 --- 21 unchanged lines hidden (view full) --- 59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62 * SUCH DAMAGE. 63 * 64 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 65 */ 66 | 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 --- 21 unchanged lines hidden (view full) --- 59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62 * SUCH DAMAGE. 63 * 64 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 65 */ 66 |
67#include "opt_key.h" | 67#include "opt_ipsec.h" |
68 69#include <sys/param.h> 70#include <sys/systm.h> 71#include <sys/malloc.h> 72#include <sys/mbuf.h> 73#include <sys/protosw.h> 74#include <sys/socket.h> 75#include <sys/socketvar.h> --- 15 unchanged lines hidden (view full) --- 91#include <netinet6/mld6_var.h> 92#include <netinet/in_pcb.h> 93#include <netinet6/nd6.h> 94#include <netinet6/in6_ifattach.h> 95#include <netinet6/ip6protosw.h> 96 97#ifdef IPSEC 98#include <netinet6/ipsec.h> | 68 69#include <sys/param.h> 70#include <sys/systm.h> 71#include <sys/malloc.h> 72#include <sys/mbuf.h> 73#include <sys/protosw.h> 74#include <sys/socket.h> 75#include <sys/socketvar.h> --- 15 unchanged lines hidden (view full) --- 91#include <netinet6/mld6_var.h> 92#include <netinet/in_pcb.h> 93#include <netinet6/nd6.h> 94#include <netinet6/in6_ifattach.h> 95#include <netinet6/ip6protosw.h> 96 97#ifdef IPSEC 98#include <netinet6/ipsec.h> |
99#include <netinet6/ah.h> |
|
99#include <netinet6/ipsec6.h> | 100#include <netinet6/ipsec6.h> |
101#include <netinet6/ah6.h> |
|
100#include <netkey/key.h> | 102#include <netkey/key.h> |
101#ifdef KEY_DEBUG | 103#ifdef IPSEC_DEBUG |
102#include <netkey/key_debug.h> 103#else | 104#include <netkey/key_debug.h> 105#else |
104#define DPRINTF(lev,arg) 105#define DDO(lev, stmt) 106#define DP(x, y, z) 107#endif /* KEY_DEBUG */ | 106#define KEYDEBUG(lev,arg) 107#endif |
108#endif /* IPSEC */ 109 110#include "faith.h" 111 112#include <net/net_osdep.h> 113 114extern struct domain inet6domain; 115extern struct ip6protosw inet6sw[]; --- 1164 unchanged lines hidden (view full) --- 1280 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6, 1281 sizeof(struct ip6_hdr), plen); 1282 1283 /* 1284 * xxx option handling 1285 */ 1286 1287 m->m_flags &= ~(M_BCAST|M_MCAST); | 108#endif /* IPSEC */ 109 110#include "faith.h" 111 112#include <net/net_osdep.h> 113 114extern struct domain inet6domain; 115extern struct ip6protosw inet6sw[]; --- 1164 unchanged lines hidden (view full) --- 1280 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6, 1281 sizeof(struct ip6_hdr), plen); 1282 1283 /* 1284 * xxx option handling 1285 */ 1286 1287 m->m_flags &= ~(M_BCAST|M_MCAST); |
1288#ifdef IPSEC 1289 m->m_pkthdr.rcvif = NULL; 1290#endif /*IPSEC*/ | |
1291 1292#ifdef COMPAT_RFC1885 1293 ip6_output(m, NULL, &icmp6_reflect_rt, 0, NULL, &outif); 1294#else 1295 ip6_output(m, NULL, NULL, 0, NULL, &outif); 1296#endif 1297 if (outif) 1298 icmp6_ifoutstat_inc(outif, type, code); --- 421 unchanged lines hidden (view full) --- 1720 1721 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); 1722 1723 nd_rd->nd_rd_cksum = 0; 1724 nd_rd->nd_rd_cksum 1725 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); 1726 1727 /* send the packet to outside... */ | 1288 1289#ifdef COMPAT_RFC1885 1290 ip6_output(m, NULL, &icmp6_reflect_rt, 0, NULL, &outif); 1291#else 1292 ip6_output(m, NULL, NULL, 0, NULL, &outif); 1293#endif 1294 if (outif) 1295 icmp6_ifoutstat_inc(outif, type, code); --- 421 unchanged lines hidden (view full) --- 1717 1718 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); 1719 1720 nd_rd->nd_rd_cksum = 0; 1721 nd_rd->nd_rd_cksum 1722 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); 1723 1724 /* send the packet to outside... */ |
1728#ifdef IPSEC 1729 m->m_pkthdr.rcvif = NULL; 1730#endif /*IPSEC*/ | |
1731 ip6_output(m, NULL, NULL, 0, NULL, &outif); 1732 if (outif) { 1733 icmp6_ifstat_inc(outif, ifs6_out_msg); 1734 icmp6_ifstat_inc(outif, ifs6_out_redirect); 1735 } 1736 icmp6stat.icp6s_outhist[ND_REDIRECT]++; 1737 1738 return; --- 121 unchanged lines hidden --- | 1725 ip6_output(m, NULL, NULL, 0, NULL, &outif); 1726 if (outif) { 1727 icmp6_ifstat_inc(outif, ifs6_out_msg); 1728 icmp6_ifstat_inc(outif, ifs6_out_redirect); 1729 } 1730 icmp6stat.icp6s_outhist[ND_REDIRECT]++; 1731 1732 return; --- 121 unchanged lines hidden --- |