route.c (33181) | route.c (35256) |
---|---|
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 --- 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 * @(#)route.c 8.2 (Berkeley) 11/15/93 | 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 --- 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 * @(#)route.c 8.2 (Berkeley) 11/15/93 |
34 * $Id: route.c,v 1.48 1998/02/06 12:13:48 eivind Exp $ | 34 * $Id: route.c,v 1.49 1998/02/09 06:09:59 eivind Exp $ |
35 */ 36 37#include "opt_inet.h" 38#include "opt_mrouting.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> --- 447 unchanged lines hidden (view full) --- 490 if ((rt->rt_flags & RTF_PRCLONING) && netmask) { 491 rnh->rnh_walktree_from(rnh, dst, netmask, 492 rt_fixdelete, rt); 493 } 494 495 /* 496 * Remove any external references we may have. 497 * This might result in another rtentry being freed if | 35 */ 36 37#include "opt_inet.h" 38#include "opt_mrouting.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> --- 447 unchanged lines hidden (view full) --- 490 if ((rt->rt_flags & RTF_PRCLONING) && netmask) { 491 rnh->rnh_walktree_from(rnh, dst, netmask, 492 rt_fixdelete, rt); 493 } 494 495 /* 496 * Remove any external references we may have. 497 * This might result in another rtentry being freed if |
498 * we held it's last reference. | 498 * we held its last reference. |
499 */ 500 if (rt->rt_gwroute) { 501 rt = rt->rt_gwroute; 502 RTFREE(rt); 503 (rt = (struct rtentry *)rn)->rt_gwroute = 0; 504 } 505 506 /* --- 538 unchanged lines hidden (view full) --- 1045 * And substitute in references to the ifaddr 1046 * we are adding. 1047 */ 1048 rt->rt_ifa = ifa; 1049 rt->rt_ifp = ifa->ifa_ifp; 1050 ifa->ifa_refcnt++; 1051 /* 1052 * Now ask the protocol to check if it needs | 499 */ 500 if (rt->rt_gwroute) { 501 rt = rt->rt_gwroute; 502 RTFREE(rt); 503 (rt = (struct rtentry *)rn)->rt_gwroute = 0; 504 } 505 506 /* --- 538 unchanged lines hidden (view full) --- 1045 * And substitute in references to the ifaddr 1046 * we are adding. 1047 */ 1048 rt->rt_ifa = ifa; 1049 rt->rt_ifp = ifa->ifa_ifp; 1050 ifa->ifa_refcnt++; 1051 /* 1052 * Now ask the protocol to check if it needs |
1053 * any special processing in it's new form. | 1053 * any special processing in its new form. |
1054 */ 1055 if (ifa->ifa_rtrequest) 1056 ifa->ifa_rtrequest(RTM_ADD, rt, SA(0)); 1057 } 1058 /* 1059 * notify any listenning routing agents of the change 1060 */ 1061 rt_newaddrmsg(cmd, ifa, error, nrt); 1062 } 1063 return (error); 1064} | 1054 */ 1055 if (ifa->ifa_rtrequest) 1056 ifa->ifa_rtrequest(RTM_ADD, rt, SA(0)); 1057 } 1058 /* 1059 * notify any listenning routing agents of the change 1060 */ 1061 rt_newaddrmsg(cmd, ifa, error, nrt); 1062 } 1063 return (error); 1064} |