From nobody Thu Mar 10 00:33:39 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 1423C19F348D; Thu, 10 Mar 2022 00:33:40 +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 4KDVRR6sLYz4l3S; Thu, 10 Mar 2022 00:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872420; 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=9GKFAK/5shPsqT854WBkEOWGpRJpbdw1vmRmfbAQr3Y=; b=IYLkoCJkk74K5fyv/QYKQNuSXr/Y60xt2XE32NZqLwRZzagVXjRkJc+q2I9u2udshHve5u w/04gtwFHaBqD/7T8ywlBuIYebJgxd8dCr3tOXbf/Dr+yg7Xn4o7ZhAUPXEVDLzb2esvlC 863zWJpiLZEZ2jLVu0MgP6nsqaWNfezciPOm3ejJm05RXaMaau4/hyxuJGgxaw4q1YxqRE Esb34WecxPtOXb+rueSA2a9D3hAOAzXv0TMm3t2mqE4m/2n3Ypqt46+rtorgD+8LqXzM4k G7AvsHz5bRKtZdAhcST/ZDF6uqRGErfBcGEXgmOeoezYPoxRIGwWawUpaJ3MTQ== 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 CBF5C1B0AF; Thu, 10 Mar 2022 00:33:39 +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 22A0XdB3059740; Thu, 10 Mar 2022 00:33:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22A0XdpK059739; Thu, 10 Mar 2022 00:33:39 GMT (envelope-from git) Date: Thu, 10 Mar 2022 00:33:39 GMT Message-Id: <202203100033.22A0XdpK059739@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: a98f745dbb18 - stable/12 - ipfilter: Introduce the new FORMAT_IF macro 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: a98f745dbb1808f89855c85e524209a65aa29550 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872420; 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=9GKFAK/5shPsqT854WBkEOWGpRJpbdw1vmRmfbAQr3Y=; b=sf0YAT455MuEeSf9EIpLVr9Wiz5T2QH4GWk0Rof2rJ+Eatve4RgBIpvAG4MK9ZHy7rTxc8 n5kZjGuuFgBEJ6an34etoyEy9yK8x6CshzLpwmQ6/o6Q6FFertr6aHm0rdMwEHLy82fTvp tU1i4zdCm8qoGBd2EHpjrTPxLkfVQ2AXsRFCO8Fze36hVE95cK0kByEQrcWqs7A0MTgem7 ijIjMj0JSSIwXuS/UofIcdPoOLPQNSS7LakyLJzUnq2CI551Wtbr0unra7r5jZnkdlxJUn c0an9KfYBprKqmLuYKRdop4J2adofGtIp+I5v3azpYAhDYdQMKLgzQj2n+ksSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646872420; a=rsa-sha256; cv=none; b=hA7zkjWfy/fZCnmnf1p9MtCOdezSsK3K6m1VmImVTsdr7YOVfoGaRuFqFjA6RWReST/7iz wtlq7qwov4NCZ4J2e07vc4AYptYil9hD4RbiWqou7TES4ds3N4cbkf2e7zwaMAc7eRB0h5 HtFj+VX6IEdP1yjqZiOMp9EFdHTLsM67IzBAY1ik9+TveGEKlqEJByzMJKRIjZ66tKHDAz sa7+Iijcng7z32g7jQeygBQQPL2AuWsMDLXbS10G9piKvaiSwP3ZNZ7v2wesXYk6qYIav8 QngLGE8Z2/lGX5ZUoLpoqo9g9T9oNd4MB0bYWxwlroSl+gzI1SlI68mgxmMpgw== 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=a98f745dbb1808f89855c85e524209a65aa29550 commit a98f745dbb1808f89855c85e524209a65aa29550 Author: Cy Schubert AuthorDate: 2022-03-03 06:21:59 +0000 Commit: Cy Schubert CommitDate: 2022-03-10 00:33:20 +0000 ipfilter: Introduce the new FORMAT_IF macro Interface names stored in the ipstate_t and ipnat_t structures can be NULL. This occurs when an application, such as named, is running on the firewall machine itself. For example an application, i.e. named, running on the firewall itself will cause a state table display and NAT mapping display to show a null ingress interface and its egress interface. This is perfectly valid but confusing to human eyes. Rather than print nothing, print "(null)". (cherry picked from commit 915395a2800a09a64ae41ca96eabcb5e16b44309) --- sbin/ipf/common/ipf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/common/ipf.h b/sbin/ipf/common/ipf.h index e178cfc1676e..b278d8ec5d6c 100644 --- a/sbin/ipf/common/ipf.h +++ b/sbin/ipf/common/ipf.h @@ -103,6 +103,7 @@ typedef unsigned int u_32_t; #define PRINTF (void)printf #define FPRINTF (void)fprintf +#define FORMAT_IF(_a) (_a != NULL ? _a : "(null)") struct ipopt_names {