Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_output.c
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | #ifdef KERN_TLS | ||||
/* | /* | ||||
* If this is an unencrypted TLS record, save a reference to | * If this is an unencrypted TLS record, save a reference to | ||||
* the record. This local reference is used to call | * the record. This local reference is used to call | ||||
* ktls_output_eagain after the mbuf has been freed (thus | * ktls_output_eagain after the mbuf has been freed (thus | ||||
* dropping the mbuf's reference) in if_output. | * dropping the mbuf's reference) in if_output. | ||||
*/ | */ | ||||
if (m->m_next != NULL && mbuf_has_tls_session(m->m_next)) { | if (m->m_next != NULL && mbuf_has_tls_session(m->m_next)) { | ||||
tls = ktls_hold(m->m_next->m_epg_tls); | tls = ktls_hold(m->m_next->m_epg_tls); | ||||
mst = tls->snd_tag; | mst = tls->snd_rcv_tag; | ||||
/* | /* | ||||
* If a TLS session doesn't have a valid tag, it must | * If a TLS session doesn't have a valid tag, it must | ||||
* have had an earlier ifp mismatch, so drop this | * have had an earlier ifp mismatch, so drop this | ||||
* packet. | * packet. | ||||
*/ | */ | ||||
if (mst == NULL) { | if (mst == NULL) { | ||||
error = EAGAIN; | error = EAGAIN; | ||||
Show All 31 Lines | #endif | ||||
error = (*ifp->if_output)(ifp, m, gw, ro); | error = (*ifp->if_output)(ifp, m, gw, ro); | ||||
done: | done: | ||||
/* Check for route change invalidating send tags. */ | /* Check for route change invalidating send tags. */ | ||||
#ifdef KERN_TLS | #ifdef KERN_TLS | ||||
if (tls != NULL) { | if (tls != NULL) { | ||||
if (error == EAGAIN) | if (error == EAGAIN) | ||||
error = ktls_output_eagain(inp, tls); | error = ktls_output_eagain(inp); | ||||
ktls_free(tls); | ktls_free(tls); | ||||
} | } | ||||
#endif | #endif | ||||
#ifdef RATELIMIT | #ifdef RATELIMIT | ||||
if (error == EAGAIN) | if (error == EAGAIN) | ||||
in_pcboutput_eagain(inp); | in_pcboutput_eagain(inp); | ||||
#endif | #endif | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 1,335 Lines • Show Last 20 Lines |