if_atm.c (178888) | if_atm.c (186119) |
---|---|
1/* $NetBSD: if_atm.c,v 1.6 1996/10/13 02:03:01 christos Exp $ */ 2 3/*- 4 * 5 * Copyright (c) 1996 Charles D. Cranor and Washington University. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34#include <sys/cdefs.h> | 1/* $NetBSD: if_atm.c,v 1.6 1996/10/13 02:03:01 christos Exp $ */ 2 3/*- 4 * 5 * Copyright (c) 1996 Charles D. Cranor and Washington University. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/netinet/if_atm.c 178888 2008-05-09 23:03:00Z julian $"); | 35__FBSDID("$FreeBSD: head/sys/netinet/if_atm.c 186119 2008-12-15 06:10:57Z qingli $"); |
36 37/* 38 * IP <=> ATM address resolution. 39 */ 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_natm.h" 43 --- 78 unchanged lines hidden (view full) --- 122 if ((rt->rt_flags & RTF_HOST) == 0) { 123 rt_setgate(rt,rt_key(rt),(struct sockaddr *)&null_sdl); 124 gate = rt->rt_gateway; 125 SDL(gate)->sdl_type = rt->rt_ifp->if_type; 126 SDL(gate)->sdl_index = rt->rt_ifp->if_index; 127 break; 128 } 129 | 36 37/* 38 * IP <=> ATM address resolution. 39 */ 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_natm.h" 43 --- 78 unchanged lines hidden (view full) --- 122 if ((rt->rt_flags & RTF_HOST) == 0) { 123 rt_setgate(rt,rt_key(rt),(struct sockaddr *)&null_sdl); 124 gate = rt->rt_gateway; 125 SDL(gate)->sdl_type = rt->rt_ifp->if_type; 126 SDL(gate)->sdl_index = rt->rt_ifp->if_index; 127 break; 128 } 129 |
130 if ((rt->rt_flags & RTF_CLONING) != 0) { 131 printf("atm_rtrequest: cloning route detected?\n"); 132 break; 133 } | |
134 if (gate->sa_family != AF_LINK || 135 gate->sa_len < sizeof(null_sdl)) { 136 log(LOG_DEBUG, "atm_rtrequest: bad gateway value"); 137 break; 138 } 139 140 KASSERT(rt->rt_ifp->if_ioctl != NULL, 141 ("atm_rtrequest: null ioctl")); --- 185 unchanged lines hidden (view full) --- 327 } 328 329 if (rt == NULL) { 330 rt = RTALLOC1(dst, 0); /* link level on table 0 XXX MRT */ 331 if (rt == NULL) 332 goto bad; /* failed */ 333 RT_REMREF(rt); /* don't keep LL references */ 334 if ((rt->rt_flags & RTF_GATEWAY) != 0 || | 130 if (gate->sa_family != AF_LINK || 131 gate->sa_len < sizeof(null_sdl)) { 132 log(LOG_DEBUG, "atm_rtrequest: bad gateway value"); 133 break; 134 } 135 136 KASSERT(rt->rt_ifp->if_ioctl != NULL, 137 ("atm_rtrequest: null ioctl")); --- 185 unchanged lines hidden (view full) --- 323 } 324 325 if (rt == NULL) { 326 rt = RTALLOC1(dst, 0); /* link level on table 0 XXX MRT */ 327 if (rt == NULL) 328 goto bad; /* failed */ 329 RT_REMREF(rt); /* don't keep LL references */ 330 if ((rt->rt_flags & RTF_GATEWAY) != 0 || |
335 (rt->rt_flags & RTF_LLINFO) == 0 || 336 /* XXX: are we using LLINFO? */ | |
337 rt->rt_gateway->sa_family != AF_LINK) { 338 RT_UNLOCK(rt); 339 goto bad; 340 } 341 RT_UNLOCK(rt); 342 } 343 344 /* --- 26 unchanged lines hidden --- | 331 rt->rt_gateway->sa_family != AF_LINK) { 332 RT_UNLOCK(rt); 333 goto bad; 334 } 335 RT_UNLOCK(rt); 336 } 337 338 /* --- 26 unchanged lines hidden --- |