Date: Wed, 08 Jan 2020 01:45:55 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 243164] blacklistd not handling masks correctly Message-ID: <bug-243164-227-Imr1IKDCjL@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-243164-227@https.bugs.freebsd.org/bugzilla/> References: <bug-243164-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243164 Conrad Meyer <cem@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cem@freebsd.org --- Comment #2 from Conrad Meyer <cem@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 *ma= sk) 215 { 216 char *d; 217 const char *s =3D *p; 218 219 if ((d =3D strchr(s, ':')) !=3D NULL) { 220 *d++ =3D '\0'; 221 *p =3D d; 222 } 223 if ((d =3D strchr(s, '/')) =3D=3D NULL) { 224 *mask =3D FSTAR; 225 return 0; If there is no /mask, *mask is treated as "FSTAR". In conf_addr_set: 585 if (c->c_lmask =3D=3D FSTAR) 586 c->c_lmask =3D (int)(alen * 8); That, uh, suggests no mask should indicate /32 or /128 for v6. I wonder wh= at goes wrong. --=20 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-243164-227-Imr1IKDCjL>