* Find the hook with a given session ID. */
| 704 | * Find the hook with a given session ID. |
| 705 | */ |
| 706 | static hookpriv_p |
| 707 | ng_l2tp_find_session(priv_p privp, u_int16_t sid) |
| 708 | { |
| 709 | uint16_t hash = SESSHASH(sid); |
| 710 | hookpriv_p hpriv = NULL; |
| 711 | |
| 712 | LIST_FOREACH(hpriv, &privp->sesshash[hash], sessions) { |
| 713 | if (hpriv->conf.session_id == sid) |
| 714 | break; |
| 715 | } |
| 716 | |
| 717 | return (hpriv); |
| 718 | } |
| 719 | |
| 720 | /* |
| 721 | * Reset a hook's session state. |
no outgoing calls
no test coverage detected