in6_ifattach.c (196481) | in6_ifattach.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: in6_ifattach.c,v 1.118 2001/05/24 07:44:00 itojun 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: in6_ifattach.c,v 1.118 2001/05/24 07:44:00 itojun Exp $ 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet6/in6_ifattach.c 196481 2009-08-23 20:40:19Z rwatson $"); | 33__FBSDID("$FreeBSD: head/sys/netinet6/in6_ifattach.c 197138 2009-09-12 22:08:20Z hrs $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/malloc.h> 38#include <sys/socket.h> 39#include <sys/sockio.h> 40#include <sys/jail.h> 41#include <sys/kernel.h> --- 703 unchanged lines hidden (view full) --- 745 return; 746 } else 747 ifa_free(ifa); 748 } 749 750 /* 751 * assign a link-local address, if there's none. 752 */ | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/malloc.h> 38#include <sys/socket.h> 39#include <sys/sockio.h> 40#include <sys/jail.h> 41#include <sys/kernel.h> --- 703 unchanged lines hidden (view full) --- 745 return; 746 } else 747 ifa_free(ifa); 748 } 749 750 /* 751 * assign a link-local address, if there's none. 752 */ |
753 if (V_ip6_auto_linklocal && ifp->if_type != IFT_BRIDGE) { | 753 if (ifp->if_type != IFT_BRIDGE && 754 !(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && 755 ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) { 756 int error; 757 |
754 ia = in6ifa_ifpforlinklocal(ifp, 0); 755 if (ia == NULL) { | 758 ia = in6ifa_ifpforlinklocal(ifp, 0); 759 if (ia == NULL) { |
756 if (in6_ifattach_linklocal(ifp, altifp) == 0) { 757 /* linklocal address assigned */ 758 } else { 759 /* failed to assign linklocal address. bark? */ 760 } | 760 error = in6_ifattach_linklocal(ifp, altifp); 761 if (error) 762 log(LOG_NOTICE, "in6_ifattach_linklocal: " 763 "failed to add a link-local addr to %s\n", 764 if_name(ifp)); |
761 } else 762 ifa_free(&ia->ia_ifa); 763 } 764 765#ifdef IFT_STF /* XXX */ 766statinit: 767#endif 768 --- 196 unchanged lines hidden --- | 765 } else 766 ifa_free(&ia->ia_ifa); 767 } 768 769#ifdef IFT_STF /* XXX */ 770statinit: 771#endif 772 --- 196 unchanged lines hidden --- |