From owner-svn-src-all@freebsd.org Thu Feb 1 02:00:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BDE0ECDE3A; Thu, 1 Feb 2018 02:00:37 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA90C8393D; Thu, 1 Feb 2018 02:00:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D57AE2E0F2; Thu, 1 Feb 2018 02:00:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1120aea078475; Thu, 1 Feb 2018 02:00:36 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1120aQn078474; Thu, 1 Feb 2018 02:00:36 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201802010200.w1120aQn078474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 1 Feb 2018 02:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r328649 - stable/10/sbin/pfctl X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/10/sbin/pfctl X-SVN-Commit-Revision: 328649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 02:00:37 -0000 Author: pfg Date: Thu Feb 1 02:00:36 2018 New Revision: 328649 URL: https://svnweb.freebsd.org/changeset/base/328649 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/10/sbin/pfctl/pfctl_optimize.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/pfctl/pfctl_optimize.c ============================================================================== --- stable/10/sbin/pfctl/pfctl_optimize.c Thu Feb 1 01:59:37 2018 (r328648) +++ stable/10/sbin/pfctl/pfctl_optimize.c Thu Feb 1 02:00:36 2018 (r328649) @@ -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);