Add IPv6 only host support #241

Merged
merged 5 commits into from Jun 24, 2014

Projects

None yet

3 participants

@bohdan-s
Contributor

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.

bohdan-s added some commits Jun 21, 2014
@laf
Member
laf commented Jun 21, 2014

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.

@bohdan-s
Contributor

Hi,
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.

@paulgear
Member

Looks like that $transport fix is limited to SNMP v2c; SNMP v3 has the same issue.

@bohdan-s
Contributor

thanks paulgear, moved both the transport and port checks to a common section of code for both v2 and v3

@paulgear paulgear merged commit 64e92db into librenms:master Jun 24, 2014

1 check passed

default Scrutinizer: 5 new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment