if_atmsubr.c (183013) | if_atmsubr.c (186119) |
---|---|
1/* $NetBSD: if_atmsubr.c,v 1.10 1997/03/11 23:19:51 chuck 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 --- 21 unchanged lines hidden (view full) --- 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 * if_atmsubr.c 35 */ 36 37#include <sys/cdefs.h> | 1/* $NetBSD: if_atmsubr.c,v 1.10 1997/03/11 23:19:51 chuck 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 --- 21 unchanged lines hidden (view full) --- 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 * if_atmsubr.c 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/net/if_atmsubr.c 183013 2008-09-14 08:19:48Z julian $"); | 38__FBSDID("$FreeBSD: head/sys/net/if_atmsubr.c 186119 2008-12-15 06:10:57Z qingli $"); |
39 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_mac.h" 43#include "opt_natm.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> --- 101 unchanged lines hidden (view full) --- 148 */ 149 if (dst) { 150 switch (dst->sa_family) { 151 152#if defined(INET) || defined(INET6) 153 case AF_INET: 154 case AF_INET6: 155 { | 39 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_mac.h" 43#include "opt_natm.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> --- 101 unchanged lines hidden (view full) --- 148 */ 149 if (dst) { 150 switch (dst->sa_family) { 151 152#if defined(INET) || defined(INET6) 153 case AF_INET: 154 case AF_INET6: 155 { |
156 struct rtentry *rt = NULL; 157 /* 158 * check route 159 */ 160 if (rt0 != NULL) { 161 error = rt_check(&rt, &rt0, dst); 162 if (error) 163 goto bad; 164 RT_UNLOCK(rt); 165 } 166 | |
167 if (dst->sa_family == AF_INET6) 168 etype = ETHERTYPE_IPV6; 169 else 170 etype = ETHERTYPE_IP; | 156 if (dst->sa_family == AF_INET6) 157 etype = ETHERTYPE_IPV6; 158 else 159 etype = ETHERTYPE_IP; |
171 if (!atmresolve(rt, m, dst, &atmdst)) { | 160 if (!atmresolve(rt0, m, dst, &atmdst)) { |
172 m = NULL; 173 /* XXX: atmresolve already free'd it */ 174 senderr(EHOSTUNREACH); 175 /* XXX: put ATMARP stuff here */ 176 /* XXX: watch who frees m on failure */ 177 } 178 } 179 break; --- 335 unchanged lines hidden --- | 161 m = NULL; 162 /* XXX: atmresolve already free'd it */ 163 senderr(EHOSTUNREACH); 164 /* XXX: put ATMARP stuff here */ 165 /* XXX: watch who frees m on failure */ 166 } 167 } 168 break; --- 335 unchanged lines hidden --- |