nd6_nbr.c (226340) | nd6_nbr.c (228571) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 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 * $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $ 30 */ 31 32#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 --- 16 unchanged lines hidden (view full) --- 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 * $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $ 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_nbr.c 226340 2011-10-13 13:33:23Z glebius $"); | 33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_nbr.c 228571 2011-12-16 12:16:56Z glebius $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_mpath.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> --- 178 unchanged lines hidden (view full) --- 220 * Target address (taddr6) must be either: 221 * (1) Valid unicast/anycast address for my receiving interface, 222 * (2) Unicast address for which I'm offering proxy service, or 223 * (3) "tentative" address on which DAD is being performed. 224 */ 225 /* (1) and (3) check. */ 226 if (ifp->if_carp) 227 ifa = (*carp_iamatch6_p)(ifp, &taddr6); | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_mpath.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> --- 178 unchanged lines hidden (view full) --- 220 * Target address (taddr6) must be either: 221 * (1) Valid unicast/anycast address for my receiving interface, 222 * (2) Unicast address for which I'm offering proxy service, or 223 * (3) "tentative" address on which DAD is being performed. 224 */ 225 /* (1) and (3) check. */ 226 if (ifp->if_carp) 227 ifa = (*carp_iamatch6_p)(ifp, &taddr6); |
228 if (ifa == NULL) | 228 else |
229 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); 230 231 /* (2) check. */ 232 if (ifa == NULL) { 233 struct rtentry *rt; 234 struct sockaddr_in6 tsin6; 235 int need_proxy; 236#ifdef RADIX_MPATH --- 446 unchanged lines hidden (view full) --- 683 goto freeit; 684 } 685 686 if (ndopts.nd_opts_tgt_lladdr) { 687 lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1); 688 lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3; 689 } 690 | 229 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); 230 231 /* (2) check. */ 232 if (ifa == NULL) { 233 struct rtentry *rt; 234 struct sockaddr_in6 tsin6; 235 int need_proxy; 236#ifdef RADIX_MPATH --- 446 unchanged lines hidden (view full) --- 683 goto freeit; 684 } 685 686 if (ndopts.nd_opts_tgt_lladdr) { 687 lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1); 688 lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3; 689 } 690 |
691 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); | 691 /* 692 * This effectively disables the DAD check on a non-master CARP 693 * address. 694 */ 695 if (ifp->if_carp) 696 ifa = (*carp_iamatch6_p)(ifp, &taddr6); 697 else 698 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); |
692 693 /* 694 * Target address matches one of my interface address. 695 * 696 * If my address is tentative, this means that there's somebody 697 * already using the same address as mine. This indicates DAD failure. 698 * This is defined in RFC 2462. 699 * --- 428 unchanged lines hidden (view full) --- 1128 case IFT_FDDI: 1129 case IFT_IEEE1394: 1130#ifdef IFT_L2VLAN 1131 case IFT_L2VLAN: 1132#endif 1133#ifdef IFT_IEEE80211 1134 case IFT_IEEE80211: 1135#endif | 699 700 /* 701 * Target address matches one of my interface address. 702 * 703 * If my address is tentative, this means that there's somebody 704 * already using the same address as mine. This indicates DAD failure. 705 * This is defined in RFC 2462. 706 * --- 428 unchanged lines hidden (view full) --- 1135 case IFT_FDDI: 1136 case IFT_IEEE1394: 1137#ifdef IFT_L2VLAN 1138 case IFT_L2VLAN: 1139#endif 1140#ifdef IFT_IEEE80211 1141 case IFT_IEEE80211: 1142#endif |
1136#ifdef IFT_CARP 1137 case IFT_CARP: 1138#endif | |
1139 case IFT_INFINIBAND: 1140 case IFT_BRIDGE: 1141 case IFT_ISO88025: 1142 return IF_LLADDR(ifp); 1143 default: 1144 return NULL; 1145 } 1146} --- 412 unchanged lines hidden --- | 1143 case IFT_INFINIBAND: 1144 case IFT_BRIDGE: 1145 case IFT_ISO88025: 1146 return IF_LLADDR(ifp); 1147 default: 1148 return NULL; 1149 } 1150} --- 412 unchanged lines hidden --- |