[syslog-ng]syslog-ng 1.5.14 released

Gert Menke gert@menke.za.net
Tue, 5 Feb 2002 16:12:32 +0100


Hi, Balazs!

Thanks for applying my patches! I see that you have beautified my code a
little. Maybe you made a mistake, though. In affile.c:

---8<--- cut here -----
case M_SOURCE_IP: 
	if (msg->saddr) {
 		CAST(inet_address_info, addr, msg->saddr);
 		char *ip;
 		
 		ip = inet_ntoa(addr->sa.sin_addr);
		length = append_string(dest, left, ip, strlen(ip), escape);
		break;
	}
case M_HOST: {
---8<--- cut here -----

Since the break is inside the if block, the hostname will be inserted when
there is no source ip. While this is better than nothing, wouldn't it be
even better to insert a string like "127.0.0.1" ?
Can I safely assume that a missing source ip means that the mesage comes
from localhost?

Greetings
Gert