in6_src.c (243148) | in6_src.c (245230) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> |
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 243148 2012-11-16 12:12:02Z ae $"); | 64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 245230 2013-01-09 18:18:08Z ume $"); |
65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_mpath.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/lock.h> --- 305 unchanged lines hidden (view full) --- 378 379 /* Rule 4: Prefer home addresses */ 380 /* 381 * XXX: This is a TODO. We should probably merge the MIP6 382 * case above. 383 */ 384 385 /* Rule 5: Prefer outgoing interface */ | 65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_mpath.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/lock.h> --- 305 unchanged lines hidden (view full) --- 378 379 /* Rule 4: Prefer home addresses */ 380 /* 381 * XXX: This is a TODO. We should probably merge the MIP6 382 * case above. 383 */ 384 385 /* Rule 5: Prefer outgoing interface */ |
386 if (ia_best->ia_ifp == ifp && ia->ia_ifp != ifp) 387 NEXT(5); 388 if (ia_best->ia_ifp != ifp && ia->ia_ifp == ifp) 389 REPLACE(5); | 386 if (!(ND_IFINFO(ifp)->flags & ND6_IFF_NO_PREFER_IFACE)) { 387 if (ia_best->ia_ifp == ifp && ia->ia_ifp != ifp) 388 NEXT(5); 389 if (ia_best->ia_ifp != ifp && ia->ia_ifp == ifp) 390 REPLACE(5); 391 } |
390 391 /* 392 * Rule 6: Prefer matching label 393 * Note that best_policy should be non-NULL here. 394 */ 395 if (dst_policy == NULL) 396 dst_policy = lookup_addrsel_policy(dstsock); 397 if (dst_policy->label != ADDR_LABEL_NOTAPP) { --- 778 unchanged lines hidden --- | 392 393 /* 394 * Rule 6: Prefer matching label 395 * Note that best_policy should be non-NULL here. 396 */ 397 if (dst_policy == NULL) 398 dst_policy = lookup_addrsel_policy(dstsock); 399 if (dst_policy->label != ADDR_LABEL_NOTAPP) { --- 778 unchanged lines hidden --- |