All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] conntrack: -L doesn't take a value, so don't discard one (same for -IUDGEFA)
@ 2024-09-03  2:16 Ahelenia Ziemiańska
  2024-09-03  8:22 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 11+ messages in thread
From: Ahelenia Ziemiańska @ 2024-09-03  2:16 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

The manual says
   COMMANDS
       These options specify the particular operation to perform.
       Only one of them can be specified at any given time.

       -L --dump
              List connection tracking or expectation table

So, naturally, "conntrack -Lo extended" should work,
but it doesn't, it's equivalent to "conntrack -L",
and you need "conntrack -L -o extended".
This violates user expectations (borne of the Utility Syntax Guidelines)
and contradicts the manual.

optarg is unused, anyway. Unclear why any of these were :: at all?

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 src/conntrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conntrack.c b/src/conntrack.c
index 0d71352..9fa4986 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -337,7 +337,7 @@ static struct option original_opts[] = {
 	{0, 0, 0, 0}
 };
 
-static const char *getopt_str = ":L::I::U::D::G::E::F::A::hVs:d:r:q:"
+static const char *getopt_str = ":LIUDGEFAhVs:d:r:q:"
 				"p:t:u:e:a:z[:]:{:}:m:i:f:o:n::"
 				"g::c:b:C::Sj::w:l:<:>::(:):";
 
-- 
2.39.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-09-26 11:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03  2:16 [PATCH] conntrack: -L doesn't take a value, so don't discard one (same for -IUDGEFA) Ahelenia Ziemiańska
2024-09-03  8:22 ` Pablo Neira Ayuso
2024-09-03 14:53   ` Ahelenia Ziemiańska
2024-09-15 21:38     ` Pablo Neira Ayuso
2024-09-25 14:53     ` Pablo Neira Ayuso
2024-09-25 15:11       ` Ahelenia Ziemiańska
2024-09-25 20:32         ` Pablo Neira Ayuso
2024-09-26  8:28           ` наб
2024-09-26 10:32             ` Pablo Neira Ayuso
2024-09-26 10:38               ` Pablo Neira Ayuso
2024-09-26 11:05                 ` наб

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.