On Sat, Apr 22, 2017 at 08:14:06AM +0900, YASUOKA Masahiko wrote:
> 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.
>
good you could catch it.
thanks and
regards
sasha