Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2014 11:54:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 195552] New: [patch] AF_UNSPEC handling in casper DNS limits
Message-ID:  <bug-195552-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195552

            Bug ID: 195552
           Summary: [patch] AF_UNSPEC handling in casper DNS limits
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: mp39590@gmail.com

Created attachment 150065
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150065&action=edit
patch

Currently, if we set AF_UNSPEC as a limit for DNS service in casper it
won't allow us to issue any requests.

Code responsible for this check looks like this:

@ static bool
@ 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;
@                  nofamilies = false;
@                  if (family == AF_UNSPEC)
@                           continue;
@                  if (nvlist_get_number(limits, name) == (uint64_t)family)
@                           return (true);
@         }
@         [...]
@         if (nofamilies)
@                  return (true);
@
@         return (false);
@ }

Attached patch changes this behavior to following one: if limit nvlist contain
AF_UNSPEC any family is allowed.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195552-8>