TCP/UDP port range checks

Addressing task 902 on redmine.
"For TCP/UDP protocols, port_range_min must be <= port_range_max."