| 955 | } |
| 956 | |
| 957 | void |
| 958 | tcp_fastopen_disable_path(struct tcpcb *tp) |
| 959 | { |
| 960 | struct in_conninfo *inc = &tp->t_inpcb->inp_inc; |
| 961 | struct tcp_fastopen_ccache_bucket *ccb; |
| 962 | struct tcp_fastopen_ccache_entry *cce; |
| 963 | |
| 964 | cce = tcp_fastopen_ccache_lookup(inc, &ccb); |
| 965 | if (cce) { |
| 966 | cce->server_mss = 0; |
| 967 | cce->cookie_len = 0; |
| 968 | /* |
| 969 | * Preserve the existing disable time if it is already |
| 970 | * disabled. |
| 971 | */ |
| 972 | if (cce->disable_time == 0) |
| 973 | cce->disable_time = getsbinuptime(); |
| 974 | } else /* use invalid cookie len to create disabled entry */ |
| 975 | tcp_fastopen_ccache_create(ccb, inc, 0, |
| 976 | TCP_FASTOPEN_MAX_COOKIE_LEN + 1, NULL); |
| 977 | |
| 978 | CCB_UNLOCK(ccb); |
| 979 | tp->t_flags &= ~TF_FASTOPEN; |
| 980 | } |
| 981 | |
| 982 | void |
| 983 | tcp_fastopen_update_cache(struct tcpcb *tp, uint16_t mss, |
no test coverage detected