route.c (217322) | route.c (218909) |
---|---|
1/*- 2 * Copyright (c) 1980, 1986, 1991, 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 --- 13 unchanged lines hidden (view full) --- 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 * @(#)route.c 8.3.1.1 (Berkeley) 2/23/95 | 1/*- 2 * Copyright (c) 1980, 1986, 1991, 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 --- 13 unchanged lines hidden (view full) --- 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 * @(#)route.c 8.3.1.1 (Berkeley) 2/23/95 |
30 * $FreeBSD: head/sys/net/route.c 217322 2011-01-12 19:53:50Z mdf $ | 30 * $FreeBSD: head/sys/net/route.c 218909 2011-02-21 09:01:34Z brucec $ |
31 */ 32/************************************************************************ 33 * Note: In this file a 'fib' is a "forwarding information base" * 34 * Which is the new name for an in kernel routing (next hop) table. * 35 ***********************************************************************/ 36 37#include "opt_inet.h" 38#include "opt_route.h" --- 495 unchanged lines hidden (view full) --- 534 (!sa_equal(src, rt->rt_gateway) || rt->rt_ifa != ifa)) 535 error = EINVAL; 536 else if (ifa_ifwithaddr_check(gateway)) 537 error = EHOSTUNREACH; 538 if (error) 539 goto done; 540 /* 541 * Create a new entry if we just got back a wildcard entry | 31 */ 32/************************************************************************ 33 * Note: In this file a 'fib' is a "forwarding information base" * 34 * Which is the new name for an in kernel routing (next hop) table. * 35 ***********************************************************************/ 36 37#include "opt_inet.h" 38#include "opt_route.h" --- 495 unchanged lines hidden (view full) --- 534 (!sa_equal(src, rt->rt_gateway) || rt->rt_ifa != ifa)) 535 error = EINVAL; 536 else if (ifa_ifwithaddr_check(gateway)) 537 error = EHOSTUNREACH; 538 if (error) 539 goto done; 540 /* 541 * Create a new entry if we just got back a wildcard entry |
542 * or the the lookup failed. This is necessary for hosts | 542 * or the lookup failed. This is necessary for hosts |
543 * which use routing redirects generated by smart gateways 544 * to dynamically build the routing tables. 545 */ 546 if (rt == NULL || (rt_mask(rt) && rt_mask(rt)->sa_len < 2)) 547 goto create; 548 /* 549 * Don't listen to the redirect if it's 550 * for a route to an interface. --- 1049 unchanged lines hidden --- | 543 * which use routing redirects generated by smart gateways 544 * to dynamically build the routing tables. 545 */ 546 if (rt == NULL || (rt_mask(rt) && rt_mask(rt)->sa_len < 2)) 547 goto create; 548 /* 549 * Don't listen to the redirect if it's 550 * for a route to an interface. --- 1049 unchanged lines hidden --- |