Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/raw_ip6.c
Show First 20 Lines • Show All 754 Lines • ▼ Show 20 Lines | rip6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) | ||||
if (ifa != NULL && | if (ifa != NULL && | ||||
((struct in6_ifaddr *)ifa)->ia6_flags & | ((struct in6_ifaddr *)ifa)->ia6_flags & | ||||
(IN6_IFF_ANYCAST|IN6_IFF_NOTREADY| | (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY| | ||||
IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) { | IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) { | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
return (EADDRNOTAVAIL); | return (EADDRNOTAVAIL); | ||||
} | } | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
INP_INFO_WLOCK(&V_ripcbinfo); | |||||
INP_WLOCK(inp); | INP_WLOCK(inp); | ||||
INP_INFO_WLOCK(&V_ripcbinfo); | |||||
inp->in6p_laddr = addr->sin6_addr; | inp->in6p_laddr = addr->sin6_addr; | ||||
INP_WUNLOCK(inp); | |||||
INP_INFO_WUNLOCK(&V_ripcbinfo); | INP_INFO_WUNLOCK(&V_ripcbinfo); | ||||
INP_WUNLOCK(inp); | |||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) | rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) | ||||
{ | { | ||||
struct inpcb *inp; | struct inpcb *inp; | ||||
struct sockaddr_in6 *addr = (struct sockaddr_in6 *)nam; | struct sockaddr_in6 *addr = (struct sockaddr_in6 *)nam; | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |