From nobody Tue Apr 23 21:43:23 2024 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 4VPFwq49jkz5J7hg; Tue, 23 Apr 2024 21:43:23 +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 4VPFwq3dp9z4vMc; Tue, 23 Apr 2024 21:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908603; 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=7FhTs1Bl8quoMvOhYqKsevabkvO2OfOCQ+fUSp6ezgk=; b=NRnuhcQDGr2mfpS+mmuCzzS9FGacXNeuX7fXLFSS70D0YXS1iud6U0ORF3U6kUZpi1uqd+ IcJYyi1UbrQp5bRczXBRFU0aEGbwZc003gvItc9h3beOM6angPbKzdDn5NY7UV4JQtvgZp T8e6ZEk2MnDNZVCF33AANJEVcKVXCnKtswbO9BeYYQuyuTUkxCvDvkKcoC6lUNXQJ4dypu 8zFFeBSM0ulaD0dWx7xZietceFruPBZV5EfeK8KSjPjiKH/Gldj7b0XysYttHs661/DT70 D1dJvQSwhkJABUrUg5IVe/3/BAha+il65hbRixJn+NOphrnmL0+lqL6rfXIkIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713908603; a=rsa-sha256; cv=none; b=srEQ8Jq7L/cPNMTVYQLDOIwgnn+fdwZDc4odMTA3ZEjYvYmqLTbOIZhnvWoiP8yXSvH0hj uE5UdRCUjTjwmj3CTabZfARdZuZ21nntDCjPHE+4BHch+E22MwZkBoQeJmBKuk+WPRT/jE zfxn9sIFkGFU0WPlvBbJCzDqq1N6XryUwuR6ZjSuUciPEy9VOk5NFIQL8PhWI2aiycDOgx rawt+PXSIKo55E0U7xlkx7sDMI4eND4DOIGls+US14k999/TT38FpNduTAIDxP0R40OP9W YwwyYQizmI9ksUAzcOTDQbEDZMeFim8xhGQjjEBG8B9Jgfy1gHEFG/XMmApRmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713908603; 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=7FhTs1Bl8quoMvOhYqKsevabkvO2OfOCQ+fUSp6ezgk=; b=F42YGLjtRnbW2sRF4ZxsfJX6YfYMXTuwuSTyGL7gX+LiqMx5bG4mr/tgRdE8M5mTUoJz7B lFgWZLOC10UAgrxOXaJ6dseCJuloYozOwR5CK7wyrgRx1jqvbWwVMTVIYZHBu4vQlIGUUb 6xxmGTABMQJmFBnQQYNo5g+hrm6dkBQsFmowV5lwbDsU7A8bEVnGldCenIGjUqvbf8OpdO yFbAoQcV6FQh88F7IO3fbAXoJhXZuQc+z9mMd82HtC72te0M+j1UMsy7uqXsIkU2saA0xv AZ9Dk4vMp1ac+bxfTIWMBZCGdmIuOUIqsn9kdfwcqfM2UJ5ehjPxt7T7CD26JA== 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 4VPFwq3FGQznMc; Tue, 23 Apr 2024 21:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NLhN7H079963; Tue, 23 Apr 2024 21:43:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NLhNaQ079960; Tue, 23 Apr 2024 21:43:23 GMT (envelope-from git) Date: Tue, 23 Apr 2024 21:43:23 GMT Message-Id: <202404232143.43NLhNaQ079960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 93c5ba5a83d6 - main - sys/netpfil/pf: fix non-INET module build 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93c5ba5a83d6e23329e9ca9b9ed72eea613b611d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=93c5ba5a83d6e23329e9ca9b9ed72eea613b611d commit 93c5ba5a83d6e23329e9ca9b9ed72eea613b611d Author: Lexi Winter AuthorDate: 2024-04-22 21:59:12 +0000 Commit: Warner Losh CommitDate: 2024-04-23 21:13:21 +0000 sys/netpfil/pf: fix non-INET module build pf.ko, when built as a module without 'options INET' but with 'options VIMAGE', won't load: link_elf_obj: symbol vnet_entry_in_loopback_mask undefined This is because it uses IN_LOOPBACK(), which in the VIMAGE case uses INET-specific symbols. Fix by making this check conditional on #ifdef INET. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1157 --- sys/netpfil/pf/pf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index cbf5ebfc0e56..0dd4da5f271a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7956,7 +7956,10 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, if (s != NULL && s->nat_rule.ptr != NULL && s->nat_rule.ptr->action == PF_RDR && - ((pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || + ( +#ifdef INET + (pd->af == AF_INET && IN_LOOPBACK(ntohl(pd->dst->v4.s_addr))) || +#endif (pd->af == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&pd->dst->v6)))) { /* * If we're redirecting to loopback mark this packet