From 6387b5ad4472d1a8f8fbd0b7f3f32dd9d8542072 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 15 Oct 2012 02:08:22 +0200 Subject: [PATCH] Fix a crash with testline, introduced with the "underlying ipv4" feature. --- src/hostmask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hostmask.c b/src/hostmask.c index 99899af5..fb28bbbb 100644 --- a/src/hostmask.c +++ b/src/hostmask.c @@ -422,7 +422,7 @@ find_address_conf(const char *host, const char *sockhost, const char *user, } #ifdef RB_IPV6 - if(ip->sa_family == AF_INET6 && + if(ip != NULL && ip->sa_family == AF_INET6 && ipv4_from_ipv6((const struct sockaddr_in6 *)(const void *)ip, &ip4)) { kconf = find_conf_by_address(NULL, NULL, NULL, (struct sockaddr *)&ip4, CONF_KILL, AF_INET, vuser, NULL);