Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_pcb.c
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
| #include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
| __FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
| #include "opt_inet.h" | #include "opt_inet.h" | ||||
| #include "opt_inet6.h" | #include "opt_inet6.h" | ||||
| #include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
| #include "opt_pcbgroup.h" | #include "opt_pcbgroup.h" | ||||
| #include "opt_route.h" | |||||
| #include "opt_rss.h" | #include "opt_rss.h" | ||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/systm.h> | #include <sys/systm.h> | ||||
| #include <sys/malloc.h> | #include <sys/malloc.h> | ||||
| #include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
| #include <sys/domain.h> | #include <sys/domain.h> | ||||
| #include <sys/protosw.h> | #include <sys/protosw.h> | ||||
| ▲ Show 20 Lines • Show All 334 Lines • ▼ Show 20 Lines | in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, | ||||
| int error; | int error; | ||||
| bzero(&laddr6, sizeof(laddr6)); | bzero(&laddr6, sizeof(laddr6)); | ||||
| laddr6.sin6_family = AF_INET6; | laddr6.sin6_family = AF_INET6; | ||||
| INP_WLOCK_ASSERT(inp); | INP_WLOCK_ASSERT(inp); | ||||
| INP_HASH_WLOCK_ASSERT(pcbinfo); | INP_HASH_WLOCK_ASSERT(pcbinfo); | ||||
| #ifdef ROUTE_MPATH | |||||
| if (V_fib_hash_outbound) { | |||||
| uint32_t hash_type, hash_val; | |||||
| hash_val = fib6_calc_software_hash(&inp->in6p_laddr, | |||||
| &sin6->sin6_addr, 0, sin6->sin6_port, | |||||
| inp->inp_socket->so_proto->pr_protocol, &hash_type); | |||||
| inp->inp_flowid = hash_val; | |||||
| inp->inp_flowtype = hash_type; | |||||
| } | |||||
| #endif | |||||
| /* | /* | ||||
| * Call inner routine, to assign local interface address. | * Call inner routine, to assign local interface address. | ||||
| * in6_pcbladdr() may automatically fill in sin6_scope_id. | * in6_pcbladdr() may automatically fill in sin6_scope_id. | ||||
| */ | */ | ||||
| if ((error = in6_pcbladdr(inp, nam, &laddr6.sin6_addr)) != 0) | if ((error = in6_pcbladdr(inp, nam, &laddr6.sin6_addr)) != 0) | ||||
| return (error); | return (error); | ||||
| if (in6_pcblookup_hash_locked(pcbinfo, &sin6->sin6_addr, | if (in6_pcblookup_hash_locked(pcbinfo, &sin6->sin6_addr, | ||||
| ▲ Show 20 Lines • Show All 960 Lines • Show Last 20 Lines | |||||