author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 25 Sep 2008 20:10:17 +0000 (20:10 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 25 Sep 2008 20:10:17 +0000 (20:10 +0000) | ||
commit | 0faa9b560467e16389f72a19a46289ab539c090e | |
tree | eb11c90fda4793e2c0cbc384544b25b2d199b9f9 | tree | snapshot |
parent | 8b0969137815ed206f9326cbed0b6c399bb914d0 | commit | diff |
Support for IPv6 has been broken with revision 1522: Because IPv6-addresses
contain colons, simply checking for a colon and using everything after it does
destroy correctly formatted IPv6-addresses.
This patch checks for dots '.' in the address. If the address contains at least
one dot, it is considered to be a hostname or an IPv4-address and a simple
search for a colon is done.
If no dot is found, the code will check for an opening square bracket '[' at
the beginning of the address. If one if found, the format
[address]:port
is assumed.
If neither applies, the default port will be used.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1523 a5681a0c-68f1-0310-ab6d-d61299d08faa
contain colons, simply checking for a colon and using everything after it does
destroy correctly formatted IPv6-addresses.
This patch checks for dots '.' in the address. If the address contains at least
one dot, it is considered to be a hostname or an IPv4-address and a simple
search for a colon is done.
If no dot is found, the code will check for an opening square bracket '[' at
the beginning of the address. If one if found, the format
[address]:port
is assumed.
If neither applies, the default port will be used.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1523 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/doc/rrdcached.pod | diff | blob | history | |
program/src/rrd_daemon.c | diff | blob | history |