fix bug: check rang for v4/v6.