Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in_pcb.c
Show All 40 Lines | |||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
#include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_ratelimit.h" | #include "opt_ratelimit.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/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/callout.h> | #include <sys/callout.h> | ||||
▲ Show 20 Lines • Show All 1,265 Lines • ▼ Show 20 Lines | in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam, | ||||
if (sin->sin_family != AF_INET) | if (sin->sin_family != AF_INET) | ||||
return (EAFNOSUPPORT); | return (EAFNOSUPPORT); | ||||
if (sin->sin_port == 0) | if (sin->sin_port == 0) | ||||
return (EADDRNOTAVAIL); | return (EADDRNOTAVAIL); | ||||
laddr.s_addr = *laddrp; | laddr.s_addr = *laddrp; | ||||
lport = *lportp; | lport = *lportp; | ||||
faddr = sin->sin_addr; | faddr = sin->sin_addr; | ||||
fport = sin->sin_port; | fport = sin->sin_port; | ||||
#ifdef ROUTE_MPATH | |||||
if (V_fib_hash_outbound) { | |||||
uint32_t hash_val, hash_type; | |||||
hash_val = fib4_calc_software_hash(laddr, faddr, 0, fport, | |||||
inp->inp_socket->so_proto->pr_protocol, &hash_type); | |||||
inp->inp_flowid = hash_val; | |||||
inp->inp_flowtype = hash_type; | |||||
} | |||||
#endif | |||||
if (!CK_STAILQ_EMPTY(&V_in_ifaddrhead)) { | if (!CK_STAILQ_EMPTY(&V_in_ifaddrhead)) { | ||||
/* | /* | ||||
* If the destination address is INADDR_ANY, | * If the destination address is INADDR_ANY, | ||||
* use the primary local address. | * use the primary local address. | ||||
* If the supplied address is INADDR_BROADCAST, | * If the supplied address is INADDR_BROADCAST, | ||||
* and the primary interface supports broadcast, | * and the primary interface supports broadcast, | ||||
* choose the broadcast address for that interface. | * choose the broadcast address for that interface. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,187 Lines • Show Last 20 Lines |