ip query: check length for v4, for the exception of storing v6 data in v4 entry