Efficient Network Policy Checking with Multi-dimensional Graph Traversal Algorithm