git: 848075bff4de - stable/14 - ipfw: Remove more unused IP_FW_* cases
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Oct 2025 13:45:36 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=848075bff4dec6d9a1a992ec339ea1342b3c5bc5
commit 848075bff4dec6d9a1a992ec339ea1342b3c5bc5
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-10-25 22:32:05 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-10-29 13:45:11 +0000
ipfw: Remove more unused IP_FW_* cases
All of the do_cmd() calls are in dummynet.c and specify the socket
option at compile time; none of these removed cases are used in ipfw
after the v3 work.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53378
(cherry picked from commit 0e2e0fb955adf15a217949bc4cc337d53d2c7259)
(cherry picked from commit 6b1e5d4d20a94b5bebd726eb6d1df8dca2738f8e)
---
sbin/ipfw/ipfw2.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 43b69c742f15..eecf6a9c056f 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -620,11 +620,7 @@ do_cmd(int optname, void *optval, uintptr_t optlen)
if (ipfw_socket < 0)
err(EX_UNAVAILABLE, "socket");
- if (optname == IP_FW_GET ||
- optname == IP_FW_ADD || optname == IP_FW3 ||
- optname == IP_FW_NAT_GET_CONFIG ||
- optname < 0 ||
- optname == IP_FW_NAT_GET_LOG) {
+ if (optname == IP_FW3 || optname < 0) {
if (optname < 0)
optname = -optname;
i = getsockopt(ipfw_socket, IPPROTO_IP, optname, optval,