diff -aur ipsec-tools-0.4-orig/src/racoon/sockmisc.c ipsec-tools-0.4/src/racoon/sockmisc.c --- ipsec-tools-0.4-orig/src/racoon/sockmisc.c 2004-11-16 11:15:42.000000000 -0500 +++ ipsec-tools-0.4/src/racoon/sockmisc.c 2004-12-16 14:42:25.543888328 -0500 @@ -834,7 +834,7 @@ if (saddr == NULL) return NULL; - GETNAMEINFO(saddr, addr, NULL); + GETNAMEINFO_NULL(saddr, addr); snprintf(buf, sizeof(buf), "%s", addr); return buf; diff -aur ipsec-tools-0.4-orig/src/racoon/var.h ipsec-tools-0.4/src/racoon/var.h --- ipsec-tools-0.4-orig/src/racoon/var.h 2004-06-11 12:00:17.000000000 -0400 +++ ipsec-tools-0.4/src/racoon/var.h 2004-12-16 14:42:14.983493752 -0500 @@ -82,6 +82,15 @@ } \ } while (0); +#define GETNAMEINFO_NULL(x, y) \ +do { \ + if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), NULL, 0, \ + NIFLAGS) != 0) { \ + if (y) \ + strncpy((y), "(invalid)", sizeof(y)); \ + } \ +} while (0); + #include #ifndef LIST_FOREACH #define LIST_FOREACH(elm, head, field) \