Print this page
8955 bound+reserved ports can be leaked (when NFS client reboots too
quickly)
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/rpc/clnt_cots.c
          +++ new/usr/src/uts/common/rpc/clnt_cots.c
↓ open down ↓ 2272 lines elided ↑ open up ↑
2273 2273          if (cm_entry->x_early_disc) {
2274 2274                  /*
2275 2275                   * We need to check if a disconnect request has come
2276 2276                   * while we are connected, if so, then we need to
2277 2277                   * set rpcerr->re_status appropriately before returning
2278 2278                   * NULL to caller.
2279 2279                   */
2280 2280                  if (rpcerr->re_status == RPC_SUCCESS)
2281 2281                          rpcerr->re_status = RPC_XPRTFAILED;
2282 2282                  cm_entry->x_connected = FALSE;
     2283 +                cm_entry->x_dead = TRUE;
2283 2284          } else
2284 2285                  cm_entry->x_connected = connected;
2285 2286  
2286 2287          /*
2287 2288           * There could be a discrepancy here such that
2288 2289           * x_early_disc is TRUE yet connected is TRUE as well
2289 2290           * and the connection is actually connected. In that case
2290 2291           * lets be conservative and declare the connection as not
2291 2292           * connected.
2292 2293           */
↓ open down ↓ 98 lines elided ↑ open up ↑
2391 2392                  if (cm_entry->x_early_disc) {
2392 2393                          /*
2393 2394                           * We need to check if a disconnect request has come
2394 2395                           * while we are connected, if so, then we need to
2395 2396                           * set rpcerr->re_status appropriately before returning
2396 2397                           * NULL to caller.
2397 2398                           */
2398 2399                          if (rpcerr->re_status == RPC_SUCCESS)
2399 2400                                  rpcerr->re_status = RPC_XPRTFAILED;
2400 2401                          cm_entry->x_connected = FALSE;
     2402 +                        cm_entry->x_dead = TRUE;
2401 2403                  } else
2402 2404                          cm_entry->x_connected = connected;
2403 2405  
2404 2406                  /*
2405 2407                   * There could be a discrepancy here such that
2406 2408                   * x_early_disc is TRUE yet connected is TRUE as well
2407 2409                   * and the connection is actually connected. In that case
2408 2410                   * lets be conservative and declare the connection as not
2409 2411                   * connected.
2410 2412                   */
↓ open down ↓ 1350 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX