Modify ipv4_match as more like state machine fashion.