<div dir="ltr"><div class="gmail_extra">FYI,</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-size:12.8px">   Really?  How many PIDS do we juggle?</span><br></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">With PAM, there's a PID for every opening connection.  So "lots".</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">   The state table was scanned only when a loop needed to look at</span><br style="font-size:12.8px"><span style="font-size:12.8px">   every state.  This could be considered a hack.  But it was quite</span><br style="font-size:12.8px"><span style="font-size:12.8px">   practical back in the day because it was needed so rarely.  Oh, and</span><br style="font-size:12.8px"><span style="font-size:12.8px">   the hash table was pretty small.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">A review might be useful, but the case I know is deleting a connection.  I'm assuming it is sufficiently rare to not matter.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br>   Andrew also split the cookie-indexed hash table into two.  This</span><br style="font-size:12.8px"><span style="font-size:12.8px">   means that scanning the one table no longer gets you to all states.</span><br style="font-size:12.8px"><span style="font-size:12.8px">   I didn't see that such code was changed to scan both tables.</span><br style="font-size:12.8px"><span style="font-size:12.8px">   Perhaps some bugs were created by this split.  I have not looked.</span><br></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">This isn't true.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">All states always appear in all hash tables so it doesn't matter where you look; it has been this way for some time.  In IKEv2, the responder uses this to find the state for a duplicate IKEV2 init request - it uses the icookie table as the icookie+rcookie table is useless..  IKEv1 doesn't do this and is broken in this regard - the responder, not realising it has duplicates, creates a new state for every main-mode request it receives.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">Andrew</span></div><div class="gmail_extra"><br></div></div>