Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_usrreq.c
Context not available. | |||||
#ifdef INET6 | #ifdef INET6 | ||||
if (inp->inp_vflag & INP_IPV6PROTO) { | if (inp->inp_vflag & INP_IPV6PROTO) { | ||||
error = ip6_ctloutput(so, sopt); | error = ip6_ctloutput(so, sopt); | ||||
/* | |||||
* If the TCLASS changes we need to | |||||
* notify tcp stacks that care. | |||||
*/ | |||||
if ((sopt->sopt_level == IPPROTO_IPV6) && | |||||
(sopt->sopt_name == IPV6_TCLASS) && | |||||
(error == 0)) { | |||||
INP_WLOCK(inp); | |||||
if ((inp->inp_flags & | |||||
(INP_TIMEWAIT | INP_DROPPED))) { | |||||
INP_WUNLOCK(inp); | |||||
return (ECONNRESET); | |||||
} | |||||
tp = intotcpcb(inp); | |||||
if (tp->t_fb->tfb_dscp_change != NULL) { | |||||
/* | |||||
* This stack wants to know about DSCP codepoint | |||||
* changes. | |||||
*/ | |||||
(tp->t_fb->tfb_dscp_change)(tp); | |||||
} | |||||
INP_WUNLOCK(inp); | |||||
} | |||||
/* | /* | ||||
* In case of the IPV6_USE_MIN_MTU socket option, | * In case of the IPV6_USE_MIN_MTU socket option, | ||||
* the INC_IPV6MINMTU flag to announce a corresponding | * the INC_IPV6MINMTU flag to announce a corresponding | ||||
Context not available. | |||||
#endif | #endif | ||||
#ifdef INET | #ifdef INET | ||||
{ | { | ||||
/* | |||||
* If the TOS changes we need to | |||||
* notify tcp stacks that care. | |||||
*/ | |||||
error = ip_ctloutput(so, sopt); | error = ip_ctloutput(so, sopt); | ||||
if ((sopt->sopt_level == IPPROTO_IP) && | |||||
(sopt->sopt_name == IP_TOS) && | |||||
(error == 0)) { | |||||
INP_WLOCK(inp); | |||||
if ((inp->inp_flags & | |||||
(INP_TIMEWAIT | INP_DROPPED))) { | |||||
INP_WUNLOCK(inp); | |||||
return (ECONNRESET); | |||||
} | |||||
tp = intotcpcb(inp); | |||||
if (tp->t_fb->tfb_dscp_change != NULL) { | |||||
/* | |||||
* This stack wants to know about DSCP codepoint | |||||
* changes. | |||||
*/ | |||||
(tp->t_fb->tfb_dscp_change)(tp); | |||||
} | |||||
INP_WUNLOCK(inp); | |||||
} | |||||
} | } | ||||
#endif | #endif | ||||
return (error); | return (error); | ||||
Context not available. |