>From ba2e67b4d4e545638522791fd17f6a5199ea39a3 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 26 Nov 2014 00:49:24 +0300 Subject: [PATCH] Fix handling of AF_UNSPEC in family rights check --- libexec/casper/dns/dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git libexec/casper/dns/dns.c libexec/casper/dns/dns.c index 08f7560..68d01bf 100644 --- libexec/casper/dns/dns.c +++ libexec/casper/dns/dns.c @@ -85,9 +85,9 @@ dns_allowed_family(const nvlist_t *limits, int family) while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) { if (strncmp(name, "family", sizeof("family") - 1) != 0) continue; + if (name == AF_UNSPEC) + return (true); nofamilies = false; - if (family == AF_UNSPEC) - continue; if (nvlist_get_number(limits, name) == (uint64_t)family) return (true); } -- 2.1.2