Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/nd6.c
Show First 20 Lines • Show All 2,545 Lines • ▼ Show 20 Lines | nd6_add_ifa_lle(struct in6_ifaddr *ia) | ||||
struct llentry *ln, *ln_tmp; | struct llentry *ln, *ln_tmp; | ||||
struct sockaddr *dst; | struct sockaddr *dst; | ||||
ifp = ia->ia_ifa.ifa_ifp; | ifp = ia->ia_ifa.ifa_ifp; | ||||
if (nd6_need_cache(ifp) == 0) | if (nd6_need_cache(ifp) == 0) | ||||
return (0); | return (0); | ||||
ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; | ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; | ||||
ia->ia_ifa.ifa_flags |= RTF_CONNECTED; | |||||
dst = (struct sockaddr *)&ia->ia_addr; | dst = (struct sockaddr *)&ia->ia_addr; | ||||
ln = lltable_alloc_entry(LLTABLE6(ifp), LLE_IFADDR, dst); | ln = lltable_alloc_entry(LLTABLE6(ifp), LLE_IFADDR, dst); | ||||
if (ln == NULL) | if (ln == NULL) | ||||
return (ENOBUFS); | return (ENOBUFS); | ||||
IF_AFDATA_WLOCK(ifp); | IF_AFDATA_WLOCK(ifp); | ||||
LLE_WLOCK(ln); | LLE_WLOCK(ln); | ||||
/* Unlink any entry if exists */ | /* Unlink any entry if exists */ | ||||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |