icmp6.c (97658) | icmp6.c (105194) |
---|---|
1/* $FreeBSD: head/sys/netinet6/icmp6.c 97658 2002-05-31 11:52:35Z tanimura $ */ | 1/* $FreeBSD: head/sys/netinet6/icmp6.c 105194 2002-10-16 01:54:46Z sam $ */ |
2/* $KAME: icmp6.c,v 1.211 2001/04/04 05:56:20 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 2143 unchanged lines hidden (view full) --- 2153 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6, 2154 sizeof(struct ip6_hdr), plen); 2155 2156 /* 2157 * XXX option handling 2158 */ 2159 2160 m->m_flags &= ~(M_BCAST|M_MCAST); | 2/* $KAME: icmp6.c,v 1.211 2001/04/04 05:56:20 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 2143 unchanged lines hidden (view full) --- 2153 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6, 2154 sizeof(struct ip6_hdr), plen); 2155 2156 /* 2157 * XXX option handling 2158 */ 2159 2160 m->m_flags &= ~(M_BCAST|M_MCAST); |
2161#ifdef IPSEC 2162 /* Don't lookup socket */ 2163 (void)ipsec_setsocket(m, NULL); 2164#endif /*IPSEC*/ | |
2165 2166#ifdef COMPAT_RFC1885 | 2161 2162#ifdef COMPAT_RFC1885 |
2167 ip6_output(m, NULL, &icmp6_reflect_rt, 0, NULL, &outif); | 2163 ip6_output(m, NULL, &icmp6_reflect_rt, 0, NULL, &outif, NULL); |
2168#else | 2164#else |
2169 ip6_output(m, NULL, NULL, 0, NULL, &outif); | 2165 ip6_output(m, NULL, NULL, 0, NULL, &outif, NULL); |
2170#endif 2171 if (outif) 2172 icmp6_ifoutstat_inc(outif, type, code); 2173 2174 return; 2175 2176 bad: 2177 m_freem(m); --- 483 unchanged lines hidden (view full) --- 2661 2662 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); 2663 2664 nd_rd->nd_rd_cksum = 0; 2665 nd_rd->nd_rd_cksum 2666 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); 2667 2668 /* send the packet to outside... */ | 2166#endif 2167 if (outif) 2168 icmp6_ifoutstat_inc(outif, type, code); 2169 2170 return; 2171 2172 bad: 2173 m_freem(m); --- 483 unchanged lines hidden (view full) --- 2657 2658 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); 2659 2660 nd_rd->nd_rd_cksum = 0; 2661 nd_rd->nd_rd_cksum 2662 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); 2663 2664 /* send the packet to outside... */ |
2669#ifdef IPSEC 2670 /* Don't lookup socket */ 2671 (void)ipsec_setsocket(m, NULL); 2672#endif /*IPSEC*/ 2673 ip6_output(m, NULL, NULL, 0, NULL, &outif); | 2665 ip6_output(m, NULL, NULL, 0, NULL, &outif, NULL); |
2674 if (outif) { 2675 icmp6_ifstat_inc(outif, ifs6_out_msg); 2676 icmp6_ifstat_inc(outif, ifs6_out_redirect); 2677 } 2678 icmp6stat.icp6s_outhist[ND_REDIRECT]++; 2679 2680 return; 2681 --- 188 unchanged lines hidden --- | 2666 if (outif) { 2667 icmp6_ifstat_inc(outif, ifs6_out_msg); 2668 icmp6_ifstat_inc(outif, ifs6_out_redirect); 2669 } 2670 icmp6stat.icp6s_outhist[ND_REDIRECT]++; 2671 2672 return; 2673 --- 188 unchanged lines hidden --- |