From nobody Mon Feb 07 13:56:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78A1919B1173; Mon, 7 Feb 2022 13:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jsnjh0lFTz51km; Mon, 7 Feb 2022 13:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rMdiXHNUR89+R+npka5QvmC6QXzc7HH3KEuicHDD+8=; b=IcuJhoV6VnC+VX3s3HqKxP5cFCoZwwOBXmbVKzedoFtrStuMXCPm7Qtl9W0GttDxpkEhAW f7beGzVZCu902KN1E1fqW8nM/GMcVtErNYEm9C3aBm6Byeq+Me14rp6vF0C8akssAuNRDC ylpBMs1/tVb3A1gP2YUJ9xEaPcQJhUleCO+PzjWdAqygXnnRBhvdKMXYmsu1U6w9oT4Cd0 d5x6pNM15xjqI6CuGVnOgnemNA8PBwVD4mIDZnX2nVqMhV09iCquF+RFHYW2ZkpPTiCodT ELyzjCY6x4KnAmvLXW2WOAoFz27BWPm/BUJlVwIQKiMeWCknLbI/dr74FffjQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7844726DA3; Mon, 7 Feb 2022 13:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 217Du7AM085473; Mon, 7 Feb 2022 13:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217Du7sX085472; Mon, 7 Feb 2022 13:56:07 GMT (envelope-from git) Date: Mon, 7 Feb 2022 13:56:07 GMT Message-Id: <202202071356.217Du7sX085472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c9e2a67a6d1a - stable/12 - ipfilter userland: Fix branch mismerge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c9e2a67a6d1a2da375badc48dd32a36fefff08c2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rMdiXHNUR89+R+npka5QvmC6QXzc7HH3KEuicHDD+8=; b=hTLxnwdZjgn+fk08JDSJOWEOvWUmmjK5m/rG5Yz6NOZAUu0vjcsJkqYyCumGCnk0LR4k/U T9BdQG87jo18W5IzEOETiDIbPSowtf6zN82tvTET0lzjPt1OS1OJspt+WWp6CnRxK8geqP SHZq+xzmPn8eWjBr9v5Tg4R1QTByeg4x/IiyJ+rEg25Rx1fQy3t8wnqdcsNE19dBj0GZWE COi/+DxUk4W7L9ZjxDOkSMJHYdjziopekhfN6uXrCnuCNB8lMHO8Zq0RSRq3MweN63aE4x XcH6mD4krIvwdy7f1Zh8GnF8MbpUnbaOd5K+F0l38YsmS6x6YBYYp/X24fkgZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644242168; a=rsa-sha256; cv=none; b=cUvdZVivDeeYwgmfKaPsjTxgZDTUx0u4qbBgQFyGuS+e3mrYyUcWhc9hq9NMht2PefMzgw UHEjTC0+stgCOZTNrJSv5locBjdYMdgm30O/qCUFnyS9pi0bO+9QchT/AnXn3qD6oSWzj8 dFOimS2bbB/8OYbjtZ+HOVz7LJlQ16It9uyDZDOOjaQCpgvASLIAFW2njVYvc8wkToVB/5 GqFnOPgY24C828Xq90NLV0A7cPN2tEh9M4JJKIVCUogHa7LoFIkPObIAjCwnrRB9rA/ixj gMpa/fdcrSFmuoThyrvp5P2K2GOFb2EopyDdTyeJvPj2+dRg8sGRibELBpHphw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c9e2a67a6d1a2da375badc48dd32a36fefff08c2 commit c9e2a67a6d1a2da375badc48dd32a36fefff08c2 Author: Cy Schubert AuthorDate: 2022-01-04 03:04:04 +0000 Commit: Cy Schubert CommitDate: 2022-02-07 13:55:13 +0000 ipfilter userland: Fix branch mismerge The work to ANSIfy and adjust returns to style(9) resulted in a mismerge of a stash when ipfilter was moved from contrib to sbin. An older file replaced WIP at the time, resulting in a regression. The majority of this work was done in 2018 saved as git stashes within a git-svn tree and migrated to the git tree. The regression occurred when the various stashes were sequentially merged to create individual commits, following the ipfilter move to netpfil and sbin. Reported by: jrtc27 Fixes: 2582ae5740181e0d2bab10003d66ae91c9b56329 Pointy hat to: cy (cherry picked from commit a3522837b021a46f2de81303247599ea51163d13) --- sbin/ipf/ipf/ipfcomp.c | 71 +++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/sbin/ipf/ipf/ipfcomp.c b/sbin/ipf/ipf/ipfcomp.c index fc16f4adea2c..cf01838d7966 100644 --- a/sbin/ipf/ipf/ipfcomp.c +++ b/sbin/ipf/ipf/ipfcomp.c @@ -62,8 +62,8 @@ static FILE *cfile = NULL; * This is called once per filter rule being loaded to emit data structures * required. */ -void printc(fr) - frentry_t *fr; +void +printc(frentry_t *fr) { u_long *ulp; char *and; @@ -162,9 +162,8 @@ void printc(fr) static frgroup_t *groups = NULL; -static void addrule(fp, fr) - FILE *fp; - frentry_t *fr; +static void +addrule(FILE *fp, frentry_t *fr) { frentry_t *f, **fpp; frgroup_t *g; @@ -243,8 +242,8 @@ static u_long ipf%s_rule_data_%s_%u[] = {\n", } -int intcmp(c1, c2) - const void *c1, *c2; +int +intcmp(const void *c1, const void *c2) { const mc_t *i1 = (const mc_t *)c1, *i2 = (const mc_t *)c2; @@ -255,18 +254,15 @@ int intcmp(c1, c2) } -static void indent(fp, in) - FILE *fp; - int in; +static void +indent(FILE *fp, int in) { for (; in; in--) fputc('\t', fp); } -static void printeq(fp, var, m, max, v) - FILE *fp; - char *var; - int m, max, v; +static void +printeq(FILE *fp, char *var, int m, int max, int v) { if (m == max) fprintf(fp, "%s == %#x) {\n", var, v); @@ -280,10 +276,8 @@ static void printeq(fp, var, m, max, v) * m - netmask * v - required address */ -static void printipeq(fp, var, fl, m, v) - FILE *fp; - char *var; - int fl, m, v; +static void +printipeq(FILE *fp, char *var, int fl, int m, int v) { if (m == 0xffffffff) fprintf(fp, "%s ", var); @@ -294,10 +288,8 @@ static void printipeq(fp, var, fl, m, v) } -void emit(num, dir, v, fr) - int num, dir; - void *v; - frentry_t *fr; +void +emit(int num, int dir, void *v, frentry_t *fr) { u_int incnt, outcnt; frgroup_t *g; @@ -346,9 +338,8 @@ void emit(num, dir, v, fr) } -static void emitheader(grp, incount, outcount) - frgroup_t *grp; - u_int incount, outcount; +static void +emitheader(frgroup_t *grp, u_int incount, u_int outcount) { static FILE *fph = NULL; frgroup_t *g; @@ -401,7 +392,8 @@ extern int ipfrule_remove_out_%s(void));\n", } } -static void emittail() +static void +emittail(void) { frgroup_t *g; @@ -438,12 +430,9 @@ int ipfrule_remove()\n\ } -static void emitGroup(num, dir, v, fr, group, incount, outcount) - int num, dir; - void *v; - frentry_t *fr; - char *group; - u_int incount, outcount; +static void +emitGroup(int num, int dir, void *v, frentry_t *fr, char *group, + u_int incount, u_int outcount) { static FILE *fp = NULL; static int header[2] = { 0, 0 }; @@ -956,8 +945,8 @@ static void emitGroup(num, dir, v, fr, group, incount, outcount) } -void printC(dir) - int dir; +void +printC(int dir) { static mc_t *m = NULL; frgroup_t *g; @@ -979,11 +968,8 @@ void printC(dir) /* * Now print out code to implement all of the rules. */ -static void printCgroup(dir, top, m, group) - int dir; - frentry_t *top; - mc_t *m; - char *group; +static void +printCgroup(int dir, frentry_t *top, mc_t *m, char *group) { frentry_t *fr, *fr1; int i, n, rn; @@ -1229,11 +1215,8 @@ static void printCgroup(dir, top, m, group) } } -static void printhooks(fp, in, out, grp) - FILE *fp; - int in; - int out; - frgroup_t *grp; +static void +printhooks(FILE *fp, int in, int out, frgroup_t *grp) { frentry_t *fr; char *group;