[Bug 243164] blacklistd not handling masks correctly
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jan 8 01:45:56 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243164
Conrad Meyer <cem at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cem at freebsd.org
--- Comment #2 from Conrad Meyer <cem at freebsd.org> ---
I think the problem is this in contrib/blacklist/bin/conf.c:
213 static int
214 getmask(const char *f, size_t l, bool local, const char **p, int *mask)
215 {
216 char *d;
217 const char *s = *p;
218
219 if ((d = strchr(s, ':')) != NULL) {
220 *d++ = '\0';
221 *p = d;
222 }
223 if ((d = strchr(s, '/')) == NULL) {
224 *mask = FSTAR;
225 return 0;
If there is no /mask, *mask is treated as "FSTAR". In conf_addr_set:
585 if (c->c_lmask == FSTAR)
586 c->c_lmask = (int)(alen * 8);
That, uh, suggests no mask should indicate /32 or /128 for v6. I wonder what
goes wrong.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list