Patent ID: 7660794

Claim:
A method of tracking connections through a multithreaded firewall using a connection database and an update code associated with the connection database, the method comprising: receiving a packet containing a source internet protocol address, and a destination internet protocol address; obtaining a lock on the connection database; computing a hash index into the connection database from at least the destination internet protocol address; saving an existing value of the update code walking the database to locate any extant record in the connection database applicable to connections to the destination internet protocol address, saving a pointer to the extant record if one is found, and, if no extant record is found, saving a pointer representing a location for a new record to be added; releasing the lock on the connection database; applying filter rules to the packet; and wherein, when the filter rules allow the packet to pass through the firewall, and the packet establishes a new connection to the destination internet protocol address, and wherein there was no extant record applicable to connections to the destination address, the method further comprises: obtaining another lock on the connection database; when the saved existing value of the update code matches a current value of the update code, adding the new record to the database by using the saved pointer representing the location for the new record to be added; when the saved existing value of the update code fails to match the current value of the update code, walking the database to locate the location for the new record to be added, and adding the new record to the database; changing the update code; and releasing the another lock on the connection database; wherein mismatch of the current value of the update code and the saved existing value of the update code is indicative of an intervening change to database structure.