Added a check whether the last byte of the IP is within certain bounds.