ip_output.c (122708) | ip_output.c (122921) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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_output.c 8.3 (Berkeley) 1/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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_output.c 8.3 (Berkeley) 1/21/94 |
34 * $FreeBSD: head/sys/netinet/ip_output.c 122708 2003-11-14 21:48:57Z andre $ | 34 * $FreeBSD: head/sys/netinet/ip_output.c 122921 2003-11-20 19:47:31Z andre $ |
35 */ 36 37#include "opt_ipfw.h" 38#include "opt_ipdn.h" 39#include "opt_ipdivert.h" 40#include "opt_ipfilter.h" 41#include "opt_ipsec.h" 42#include "opt_mac.h" --- 263 unchanged lines hidden (view full) --- 306 * a protocol-cloned route since we didn't get one from the 307 * ULP. This lets TCP do its thing, while not burdening 308 * forwarding or ICMP with the overhead of cloning a route. 309 * Of course, we still want to do any cloning requested by 310 * the link layer, as this is probably required in all cases 311 * for correct operation (as it is for ARP). 312 */ 313 if (ro->ro_rt == 0) | 35 */ 36 37#include "opt_ipfw.h" 38#include "opt_ipdn.h" 39#include "opt_ipdivert.h" 40#include "opt_ipfilter.h" 41#include "opt_ipsec.h" 42#include "opt_mac.h" --- 263 unchanged lines hidden (view full) --- 306 * a protocol-cloned route since we didn't get one from the 307 * ULP. This lets TCP do its thing, while not burdening 308 * forwarding or ICMP with the overhead of cloning a route. 309 * Of course, we still want to do any cloning requested by 310 * the link layer, as this is probably required in all cases 311 * for correct operation (as it is for ARP). 312 */ 313 if (ro->ro_rt == 0) |
314 rtalloc_ign(ro, RTF_PRCLONING); | 314 rtalloc(ro); |
315 if (ro->ro_rt == 0) { 316 ipstat.ips_noroute++; 317 error = EHOSTUNREACH; 318 goto bad; 319 } 320 ia = ifatoia(ro->ro_rt->rt_ifa); 321 ifp = ro->ro_rt->rt_ifp; 322 ro->ro_rt->rt_use++; --- 612 unchanged lines hidden (view full) --- 935 * nicked from above. 936 * 937 * This rewrites the cached route in a local PCB. 938 * Is this what we want to do? 939 */ 940 bcopy(dst, &ro_fwd->ro_dst, sizeof(*dst)); 941 942 ro_fwd->ro_rt = 0; | 315 if (ro->ro_rt == 0) { 316 ipstat.ips_noroute++; 317 error = EHOSTUNREACH; 318 goto bad; 319 } 320 ia = ifatoia(ro->ro_rt->rt_ifa); 321 ifp = ro->ro_rt->rt_ifp; 322 ro->ro_rt->rt_use++; --- 612 unchanged lines hidden (view full) --- 935 * nicked from above. 936 * 937 * This rewrites the cached route in a local PCB. 938 * Is this what we want to do? 939 */ 940 bcopy(dst, &ro_fwd->ro_dst, sizeof(*dst)); 941 942 ro_fwd->ro_rt = 0; |
943 rtalloc_ign(ro_fwd, RTF_PRCLONING); | 943 rtalloc(ro_fwd); |
944 945 if (ro_fwd->ro_rt == 0) { 946 ipstat.ips_noroute++; 947 error = EHOSTUNREACH; 948 goto bad; 949 } 950 951 ia = ifatoia(ro_fwd->ro_rt->rt_ifa); --- 1313 unchanged lines hidden --- | 944 945 if (ro_fwd->ro_rt == 0) { 946 ipstat.ips_noroute++; 947 error = EHOSTUNREACH; 948 goto bad; 949 } 950 951 ia = ifatoia(ro_fwd->ro_rt->rt_ifa); --- 1313 unchanged lines hidden --- |