[PATCH conntrack] conntrack: don't print [USERSPACE] information in case of XML output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@xxxxxxxxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux