Better detection/categorization of ipv4 secondaries/virtual IPs

Fixes #3916
Fixes #3478