ip_input.c (122828) | ip_input.c (122921) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 | 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 |
34 * $FreeBSD: head/sys/netinet/ip_input.c 122828 2003-11-17 03:17:49Z green $ | 34 * $FreeBSD: head/sys/netinet/ip_input.c 122921 2003-11-20 19:47:31Z andre $ |
35 */ 36 37#include "opt_bootp.h" 38#include "opt_ipfw.h" 39#include "opt_ipdn.h" 40#include "opt_ipdivert.h" 41#include "opt_ipfilter.h" 42#include "opt_ipstealth.h" --- 1573 unchanged lines hidden (view full) --- 1616 struct in_ifaddr *ifa; 1617 struct route ro; 1618 1619 bzero(&ro, sizeof(ro)); 1620 sin = (struct sockaddr_in *)&ro.ro_dst; 1621 sin->sin_family = AF_INET; 1622 sin->sin_len = sizeof(*sin); 1623 sin->sin_addr = dst; | 35 */ 36 37#include "opt_bootp.h" 38#include "opt_ipfw.h" 39#include "opt_ipdn.h" 40#include "opt_ipdivert.h" 41#include "opt_ipfilter.h" 42#include "opt_ipstealth.h" --- 1573 unchanged lines hidden (view full) --- 1616 struct in_ifaddr *ifa; 1617 struct route ro; 1618 1619 bzero(&ro, sizeof(ro)); 1620 sin = (struct sockaddr_in *)&ro.ro_dst; 1621 sin->sin_family = AF_INET; 1622 sin->sin_len = sizeof(*sin); 1623 sin->sin_addr = dst; |
1624 rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING)); | 1624 rtalloc_ign(&ro, RTF_CLONING); |
1625 1626 if (ro.ro_rt == 0) 1627 return ((struct in_ifaddr *)0); 1628 1629 ifa = ifatoia(ro.ro_rt->rt_ifa); 1630 RTFREE(ro.ro_rt); 1631 return ifa; 1632} --- 246 unchanged lines hidden (view full) --- 1879 struct route ro; 1880 struct rtentry *rt; 1881 1882 bzero(&ro, sizeof(ro)); 1883 sin = (struct sockaddr_in *)&ro.ro_dst; 1884 sin->sin_family = AF_INET; 1885 sin->sin_len = sizeof(*sin); 1886 sin->sin_addr = pkt_dst; | 1625 1626 if (ro.ro_rt == 0) 1627 return ((struct in_ifaddr *)0); 1628 1629 ifa = ifatoia(ro.ro_rt->rt_ifa); 1630 RTFREE(ro.ro_rt); 1631 return ifa; 1632} --- 246 unchanged lines hidden (view full) --- 1879 struct route ro; 1880 struct rtentry *rt; 1881 1882 bzero(&ro, sizeof(ro)); 1883 sin = (struct sockaddr_in *)&ro.ro_dst; 1884 sin->sin_family = AF_INET; 1885 sin->sin_len = sizeof(*sin); 1886 sin->sin_addr = pkt_dst; |
1887 rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING)); | 1887 rtalloc_ign(&ro, RTF_CLONING); |
1888 1889 rt = ro.ro_rt; 1890 1891 if (rt && (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 && 1892 satosin(rt_key(rt))->sin_addr.s_addr != 0 && 1893 ipsendredirects && !srcrt && !next_hop) { 1894#define RTA(rt) ((struct in_ifaddr *)(rt->rt_ifa)) 1895 u_long src = ntohl(ip->ip_src.s_addr); --- 318 unchanged lines hidden --- | 1888 1889 rt = ro.ro_rt; 1890 1891 if (rt && (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 && 1892 satosin(rt_key(rt))->sin_addr.s_addr != 0 && 1893 ipsendredirects && !srcrt && !next_hop) { 1894#define RTA(rt) ((struct in_ifaddr *)(rt->rt_ifa)) 1895 u_long src = ntohl(ip->ip_src.s_addr); --- 318 unchanged lines hidden --- |