Date: Thu, 1 Feb 2018 01:59:38 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328648 - stable/11/sbin/pfctl Message-ID: <201802010159.w111xc9k076174@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Thu Feb 1 01:59:37 2018 New Revision: 328648 URL: https://svnweb.freebsd.org/changeset/base/328648 Log: MFC r328497: pfctl(8): Fix two wrong conditions. Caught by gcc80's -Wtautological-compare option. MFC after: 5 days Reviewed by: kp Obtained from: DragonFlyBSD (git e3cdbf6c) Modified: stable/11/sbin/pfctl/pfctl_optimize.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/pfctl/pfctl_optimize.c ============================================================================== --- stable/11/sbin/pfctl/pfctl_optimize.c Wed Jan 31 23:30:49 2018 (r328647) +++ stable/11/sbin/pfctl/pfctl_optimize.c Thu Feb 1 01:59:37 2018 (r328648) @@ -1091,7 +1091,7 @@ skip_cmp_dst_addr(struct pf_rule *a, struct pf_rule *b return (0); case PF_ADDR_DYNIFTL: if (strcmp(a->dst.addr.v.ifname, b->dst.addr.v.ifname) != 0 || - a->dst.addr.iflags != a->dst.addr.iflags || + a->dst.addr.iflags != b->dst.addr.iflags || memcmp(&a->dst.addr.v.a.mask, &b->dst.addr.v.a.mask, sizeof(a->dst.addr.v.a.mask))) return (1); @@ -1163,7 +1163,7 @@ skip_cmp_src_addr(struct pf_rule *a, struct pf_rule *b return (0); case PF_ADDR_DYNIFTL: if (strcmp(a->src.addr.v.ifname, b->src.addr.v.ifname) != 0 || - a->src.addr.iflags != a->src.addr.iflags || + a->src.addr.iflags != b->src.addr.iflags || memcmp(&a->src.addr.v.a.mask, &b->src.addr.v.a.mask, sizeof(a->src.addr.v.a.mask))) return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802010159.w111xc9k076174>