ip_icmp.c (237230) | ip_icmp.c (240233) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 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 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 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 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/ip_icmp.c 237230 2012-06-18 17:11:24Z tuexen $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_icmp.c 240233 2012-09-08 06:41:54Z glebius $"); |
34 35#include "opt_inet.h" 36#include "opt_ipsec.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/mbuf.h> 41#include <sys/protosw.h> --- 628 unchanged lines hidden (view full) --- 670 if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || 671 IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) || 672 IN_ZERONET(ntohl(ip->ip_src.s_addr)) ) { 673 m_freem(m); /* Bad return address */ 674 ICMPSTAT_INC(icps_badaddr); 675 goto done; /* Ip_output() will check for broadcast */ 676 } 677 | 34 35#include "opt_inet.h" 36#include "opt_ipsec.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/mbuf.h> 41#include <sys/protosw.h> --- 628 unchanged lines hidden (view full) --- 670 if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || 671 IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) || 672 IN_ZERONET(ntohl(ip->ip_src.s_addr)) ) { 673 m_freem(m); /* Bad return address */ 674 ICMPSTAT_INC(icps_badaddr); 675 goto done; /* Ip_output() will check for broadcast */ 676 } 677 |
678 m_addr_changed(m); 679 | |
680 t = ip->ip_dst; 681 ip->ip_dst = ip->ip_src; 682 683 /* 684 * Source selection for ICMP replies: 685 * 686 * If the incoming packet was addressed directly to one of our 687 * own addresses, use dst as the src for the reply. --- 305 unchanged lines hidden --- | 678 t = ip->ip_dst; 679 ip->ip_dst = ip->ip_src; 680 681 /* 682 * Source selection for ICMP replies: 683 * 684 * If the incoming packet was addressed directly to one of our 685 * own addresses, use dst as the src for the reply. --- 305 unchanged lines hidden --- |