Ensure that the IPPROTO_TCP level socket options
* TCP_KEEPINIT * TCP_KEEPINTVL * TCP_KEEPIDLE * TCP_KEEPCNT always always report the values currently used when getsockopt() is used. This wasn't the case when the sysctl-inherited default values where used. Ensure that the IPPROTO_TCP level socket option TCP_INFO has the TCPI_OPT_ECN flag set in the tcpi_options field when ECN support has been negotiated successfully. Reviewed by: rrs, jtl, hiren MFC after: 1 month Differential Revision: 7833
This commit is contained in:
parent
701ac88055
commit
5a17b6ad98
@ -1329,6 +1329,8 @@ tcp_fill_info(struct tcpcb *tp, struct tcp_info *ti)
|
||||
ti->tcpi_snd_wscale = tp->snd_scale;
|
||||
ti->tcpi_rcv_wscale = tp->rcv_scale;
|
||||
}
|
||||
if (tp->t_flags & TF_ECN_PERMIT)
|
||||
ti->tcpi_options |= TCPI_OPT_ECN;
|
||||
|
||||
ti->tcpi_rto = tp->t_rxtcur * tick;
|
||||
ti->tcpi_last_data_recv = (long)(ticks - (int)tp->t_rcvtime) * tick;
|
||||
@ -1817,16 +1819,16 @@ unlock_and_done:
|
||||
case TCP_KEEPCNT:
|
||||
switch (sopt->sopt_name) {
|
||||
case TCP_KEEPIDLE:
|
||||
ui = tp->t_keepidle / hz;
|
||||
ui = TP_KEEPIDLE(tp) / hz;
|
||||
break;
|
||||
case TCP_KEEPINTVL:
|
||||
ui = tp->t_keepintvl / hz;
|
||||
ui = TP_KEEPINTVL(tp) / hz;
|
||||
break;
|
||||
case TCP_KEEPINIT:
|
||||
ui = tp->t_keepinit / hz;
|
||||
ui = TP_KEEPINIT(tp) / hz;
|
||||
break;
|
||||
case TCP_KEEPCNT:
|
||||
ui = tp->t_keepcnt;
|
||||
ui = TP_KEEPCNT(tp);
|
||||
break;
|
||||
}
|
||||
INP_WUNLOCK(inp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user