Following T275394: Normalise IP addresses in HTMLUsersMultiselectField, to avoid adding multiple equivalent IP addresses, we need to do similar de-duplication for equivalent IP ranges.
From T275394#6938008:
Duplicates we are still not removing:
- 192.168.1.2 and 192.168.1.2/32 are treated as different, even though technically they are the same (same goes for IPv6).
- 192.168.123.0/24 and 192.168.123.123/24 are treated as different, even though they are the same (same goes for IPv6).