net: Surround state->node_entry changes by state_lock

Otherwise it leads to segfaults.