[rrd-developers] src/rrd_daemon.c: Fix the port configuration for IPv6.

Tobias Oetiker tobi at oetiker.ch
Thu Sep 25 22:10:46 CEST 2008


applied and switched ...

tobi

Today Florian Forster wrote:

> Oops..
>
> On Thu, Sep 25, 2008 at 07:18:16PM +0200, Florian Forster wrote:
> > +  if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
> > +  else if (*addr == '[') /* IPv6+port format */
>
> I just realized that doing it this way around will not work with
> IPv4-addresses formatted like
>   [127.0.0.1]:12345
>
> Guess that's not a biggy, but it doesn't match the documentation.
> Switching the two if-blocks (check for '[' first, then for '.') will fix
> the problem.
>
> Regards,
> -octo
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list