Adds support to add IPv6 only hosts,
It does this by rather then a gethostby lookup, we check if the user has entered an IP address rather than a hostname using inet_pton.
We don't need to know if the hostname is valid here, since the next check is a ping, which will fail if the hostname is incorrect.
Finally it adds a new dropdown to the addhost page, with a selection of tcp/udp/tcp6/udp6 with udp selected by default.
Merge pull request #1 from librenms/master
upate to master
Add IPv6 only host support
Works for me. Drops the requirement for having IPv4 hostname when adding a device but keeps it so that you can't add by IP address still.
Any thoughts on the Scrutinizer issue? https://scrutinizer-ci.com/g/librenms/librenms/inspections/c56effef-0f71-41d6-b6d6-74c334a0ff7b/issues/
Fix $transport not defined bug
That case should NEVER be hit since we are using a dropdown list, but just in-case i have wrapped it in a if case.
Looks like that $transport fix is limited to SNMP v2c; SNMP v3 has the same issue.
Move SNMP Transport & Port check to common area
thanks paulgear, moved both the transport and port checks to a common section of code for both v2 and v3