On Fri, 21 Apr 2017 13:52:51 +0900 (JST) YASUOKA Masahiko <[email protected]> wrote: > +int > +pfctl_parse_host(char *str, struct pf_rule_addr *addr) > +{ (snip) > + if ((sbs = strchr(s, '[')) != NULL || (sbe = strrchr(s, ']')) != NULL) { > + hints.ai_family = AF_INET6; > + *(sbs++) = *sbe = '\0';
The condition must be
if ((sbs = strchr(s, '[')) != NULL && (sbe = strrchr(s, ']')) != NULL) {
I will fix this before commit.
--yasuoka
