Project

General

Profile

Bug #2826 » lighttpd-remote-addr-2.diff

davidm, 2017-10-07 16:26

View differences:

inet_ntop_cache.c 2017-10-07 10:24:40.856280167 -0600
9 9
#include <string.h>
10 10

  
11 11
const char * inet_ntop_cache_get_ip(server *srv, sock_addr *addr) {
12
#if HAVE_SYS_UN_H
13
	if (addr->plain.sa_family == AF_UNIX)
14
		return "127.0.0.1";
15
#endif
12 16
#ifdef HAVE_IPV6
13 17
	size_t ndx = 0, i;
14 18
	for (i = 0; i < INET_NTOP_CACHE_MAX; i++) {
(2-2/2)