netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH conntrack] conntrack: don't print [USERSPACE] information in case of XML output
@ 2024-02-07 14:50 Ignacy Gawędzki
  2024-02-07 16:01 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Ignacy Gawędzki @ 2024-02-07 14:50 UTC (permalink / raw)
  To: netfilter-devel

In case XML output is requested, refrain from appending "[USERSPACE]"
and details to the output.

Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
---
 src/conntrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conntrack.c b/src/conntrack.c
index c1551ca..0d71352 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1944,7 +1944,7 @@ static int event_cb(const struct nlmsghdr *nlh, void *data)
 
 	nfct_snprintf_labels(buf, sizeof(buf), ct, type, op_type, op_flags, labelmap);
 done:
-	if (nlh->nlmsg_pid) {
+	if (nlh->nlmsg_pid && !(output_mask & _O_XML)) {
 		char *prog = get_progname(nlh->nlmsg_pid);
 
 		if (prog)
-- 
2.40.1

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

* Re: [PATCH conntrack] conntrack: don't print [USERSPACE] information in case of XML output
  2024-02-07 14:50 [PATCH conntrack] conntrack: don't print [USERSPACE] information in case of XML output Ignacy Gawędzki
@ 2024-02-07 16:01 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2024-02-07 16:01 UTC (permalink / raw)
  To: Ignacy Gawędzki; +Cc: netfilter-devel

Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> wrote:
> In case XML output is requested, refrain from appending "[USERSPACE]"
> and details to the output.

Applied, thanks.

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

end of thread, other threads:[~2024-02-07 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 14:50 [PATCH conntrack] conntrack: don't print [USERSPACE] information in case of XML output Ignacy Gawędzki
2024-02-07 16:01 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).