Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/in_pcb.c
Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | #endif | ||||
pcbinfo->ipi_count++; | pcbinfo->ipi_count++; | ||||
so->so_pcb = (caddr_t)inp; | so->so_pcb = (caddr_t)inp; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (V_ip6_auto_flowlabel) | if (V_ip6_auto_flowlabel) | ||||
inp->inp_flags |= IN6P_AUTOFLOWLABEL; | inp->inp_flags |= IN6P_AUTOFLOWLABEL; | ||||
#endif | #endif | ||||
inp->inp_gencnt = ++pcbinfo->ipi_gencnt; | inp->inp_gencnt = ++pcbinfo->ipi_gencnt; | ||||
refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */ | refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */ | ||||
/* | |||||
* Routes in inpcb's can cache L2 as well; they are guaranteed | |||||
* to be cleaned up. | |||||
*/ | |||||
inp->inp_route.ro_flags = RT_LLE_CACHE; | |||||
INP_LIST_WUNLOCK(pcbinfo); | INP_LIST_WUNLOCK(pcbinfo); | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) || defined(MAC) | #if defined(IPSEC) || defined(IPSEC_SUPPORT) || defined(MAC) | ||||
out: | out: | ||||
if (error != 0) { | if (error != 0) { | ||||
crfree(inp->inp_cred); | crfree(inp->inp_cred); | ||||
uma_zfree(pcbinfo->ipi_zone, inp); | uma_zfree(pcbinfo->ipi_zone, inp); | ||||
} | } | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 2,632 Lines • Show Last 20 Lines |