Deleted Added
full compact
nd6_nbr.c (196019) nd6_nbr.c (197138)
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 196019 2009-08-01 19:26:27Z rwatson $");
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_nbr.c 197138 2009-09-12 22:08:20Z hrs $");
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37#include "opt_ipsec.h"
38#include "opt_carp.h"
39#include "opt_mpath.h"
40
41#include <sys/param.h>

--- 1151 unchanged lines hidden (view full) ---

1193 ia->ia6_flags &= ~IN6_IFF_TENTATIVE;
1194 return;
1195 }
1196 if (ifa->ifa_ifp == NULL)
1197 panic("nd6_dad_start: ifa->ifa_ifp == NULL");
1198 if (!(ifa->ifa_ifp->if_flags & IFF_UP)) {
1199 return;
1200 }
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37#include "opt_ipsec.h"
38#include "opt_carp.h"
39#include "opt_mpath.h"
40
41#include <sys/param.h>

--- 1151 unchanged lines hidden (view full) ---

1193 ia->ia6_flags &= ~IN6_IFF_TENTATIVE;
1194 return;
1195 }
1196 if (ifa->ifa_ifp == NULL)
1197 panic("nd6_dad_start: ifa->ifa_ifp == NULL");
1198 if (!(ifa->ifa_ifp->if_flags & IFF_UP)) {
1199 return;
1200 }
1201 if (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_IFDISABLED)
1202 return;
1201 if (nd6_dad_find(ifa) != NULL) {
1202 /* DAD already in progress */
1203 return;
1204 }
1205
1206 dp = malloc(sizeof(*dp), M_IP6NDP, M_NOWAIT);
1207 if (dp == NULL) {
1208 log(LOG_ERR, "nd6_dad_start: memory allocation failed for "

--- 188 unchanged lines hidden (view full) ---

1397 log(LOG_ERR, "%s: manual intervention required\n",
1398 if_name(ifp));
1399
1400 /*
1401 * If the address is a link-local address formed from an interface
1402 * identifier based on the hardware address which is supposed to be
1403 * uniquely assigned (e.g., EUI-64 for an Ethernet interface), IP
1404 * operation on the interface SHOULD be disabled.
1203 if (nd6_dad_find(ifa) != NULL) {
1204 /* DAD already in progress */
1205 return;
1206 }
1207
1208 dp = malloc(sizeof(*dp), M_IP6NDP, M_NOWAIT);
1209 if (dp == NULL) {
1210 log(LOG_ERR, "nd6_dad_start: memory allocation failed for "

--- 188 unchanged lines hidden (view full) ---

1399 log(LOG_ERR, "%s: manual intervention required\n",
1400 if_name(ifp));
1401
1402 /*
1403 * If the address is a link-local address formed from an interface
1404 * identifier based on the hardware address which is supposed to be
1405 * uniquely assigned (e.g., EUI-64 for an Ethernet interface), IP
1406 * operation on the interface SHOULD be disabled.
1405 * [rfc2462bis-03 Section 5.4.5]
1407 * [RFC 4862, Section 5.4.5]
1406 */
1407 if (IN6_IS_ADDR_LINKLOCAL(&ia->ia_addr.sin6_addr)) {
1408 struct in6_addr in6;
1409
1410 /*
1411 * To avoid over-reaction, we only apply this logic when we are
1412 * very sure that hardware addresses are supposed to be unique.
1413 */

--- 109 unchanged lines hidden ---
1408 */
1409 if (IN6_IS_ADDR_LINKLOCAL(&ia->ia_addr.sin6_addr)) {
1410 struct in6_addr in6;
1411
1412 /*
1413 * To avoid over-reaction, we only apply this logic when we are
1414 * very sure that hardware addresses are supposed to be unique.
1415 */

--- 109 unchanged lines hidden ---