From 42acb16bb86fe6ec18c0591f9a9a3dbad1719d1d Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Fri, 19 Apr 2024 16:53:23 -0600 Subject: [PATCH] rescue: add ipfw, pfctl Rationale for this change: - ipf is already there - if the kernel is configured with a packet filter which drops packets by default, pfctl or ipfw will be required in the rescue environment to make the network functional. - rescue's stated purpose is to be useful for small/embedded systems (and is also quite useful for small jails); a rescue-based router would want these binaries. On amd64, this increases the size of rescue from 17346200 to 17907248, or 561048 bytes (3.2%). Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1169 --- rescue/rescue/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index c1ba22885618..6dceea6f5077 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -119,6 +119,15 @@ CRUNCH_PROGS_sbin+= ipf CRUNCH_LIBS_ipf+= ${LIBIPF} .endif +.if ${MK_IPFW} != "no" +CRUNCH_PROGS_sbin+= ipfw +.endif + +.if ${MK_PF} != "no" +CRUNCH_PROGS_sbin+= pfctl +CRUNCH_LIBS_pfctl+= ${LIBPFCTL} ${LIBNV} +.endif + .if ${MK_ROUTED} != "no" CRUNCH_PROGS_sbin+= routed rtquery .endif