[ZBX-977] problem resolving hostnames on ipv6-systems Created: 2009 Jun 29  Updated: 2017 May 30  Resolved: 2013 Jan 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.6.5
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Uwe Schwarz Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: ipv6
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 5, kernel 2.6.18-128.1.14.el5


Attachments: File zabbix-1.6.5-ipv4mapped.patch    
Issue Links:
Duplicate
duplicates ZBX-1229 Zabbix cannot compare IPv4 with IPv6 ... Closed

 Description   

zabbix-agentd is listening on :: (all interfaces, ipv6-system). If a connection comes in as ipv4 it gets masked as ::ffff:192.168.0.1, this will not be recognized by zabbix-agentd if the allowed server is only a hostname or the ipv4-ip. So in this scenario these entries don't work:
Server=zabbix
Server=192.168.0.1
Server=zabbix,192.168.0.1

But this one does:
Server=::ffff:192.168.0.1

Also giving a IPv4 listening-address solves the problem.



 Comments   
Comment by Dimitry Andric [ 2009 Jul 13 ]

I have seen the same issue using Zabbix 1.6.5, on Red Hat Enterprise Linux 5 (almost entirely equivalent to CentOS 5). The Zabbix agent listens on the IPv6 'any' address, and when it accepts an IPv4 connection from a Zabbix server, the address returned is a so-called IPv4 mapped address. When zbx_tcp_check_security() in src/libs/zbxcomms/comms.c looks up the DNS record of the "Server=" line, and this returns a IPv4 address, it will immediately quit comparing, because the address families don't match.

Comment by Dimitry Andric [ 2009 Jul 13 ]

This is a patch I am currently using to fix this issue. It checks whether accepted IPv6 connections are IPv4 mapped ones, and if so, compares as IPv4 addresses.
It should apply to Zabbix 1.6.5 source code, but may also work on later versions. (I have not checked whether it applies to the Subversion trunk.)

Comment by Andris Zeila [ 2013 Jan 30 ]

Seems it was already fixed in commit r10983.

Generated at Sat Jun 28 05:47:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.