From: Pierre Habouzit Date: Sun, 19 Oct 2008 14:42:18 +0000 (+0200) Subject: keep ipv6 out from the loop X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=951c359eed1ce1d6894a3bf10855807f4c792978;p=apps%2Fpfixtools.git keep ipv6 out from the loop Signed-off-by: Pierre Habouzit --- diff --git a/postlicyd/iplist.c b/postlicyd/iplist.c index 2aa757f..cddc70a 100644 --- a/postlicyd/iplist.c +++ b/postlicyd/iplist.c @@ -456,6 +456,10 @@ static filter_result_t iplist_filter(const filter_t *filter, const query_t *quer bool error = true; if (parse_ipv4(query->client_address, &end, &ip) != 0) { + if (strchr(query->client_address, ':')) { + /* iplist only works on IPv4 */ + return HTK_FAIL; + } warn("invalid client address: %s, expected ipv4", query->client_address); return HTK_ERROR;