All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH lnf-conntrack] conntrack: sctp: update states
Date: Thu, 13 Aug 2020 19:06:30 +0200	[thread overview]
Message-ID: <20200813170630.22987-1-fw@strlen.de> (raw)

with more recent kernels "conntrack -L" prints NONE instead of
HEARTBEAT_SENT/RECEIVED because the state is unknown in userspace.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h | 2 ++
 src/conntrack/snprintf.c                                     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h b/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h
index 192125928fd8..4982066e7eb0 100644
--- a/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h
+++ b/include/libnetfilter_conntrack/libnetfilter_conntrack_sctp.h
@@ -14,6 +14,8 @@ enum sctp_state {
 	SCTP_CONNTRACK_SHUTDOWN_SENT,
 	SCTP_CONNTRACK_SHUTDOWN_RECD,
 	SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
+	SCTP_CONNTRACK_HEARTBEAT_SENT,
+	SCTP_CONNTRACK_HEARTBEAT_ACKED,
 	SCTP_CONNTRACK_MAX
 };
 
diff --git a/src/conntrack/snprintf.c b/src/conntrack/snprintf.c
index 17ad88506eae..ac0105518163 100644
--- a/src/conntrack/snprintf.c
+++ b/src/conntrack/snprintf.c
@@ -48,6 +48,8 @@ const char *const sctp_states[SCTP_CONNTRACK_MAX] = {
 	[SCTP_CONNTRACK_SHUTDOWN_SENT]	= "SHUTDOWN_SENT",
 	[SCTP_CONNTRACK_SHUTDOWN_RECD]	= "SHUTDOWN_RECD",
 	[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = "SHUTDOWN_ACK_SENT",
+	[SCTP_CONNTRACK_HEARTBEAT_SENT] = "HEARTBEAT_SENT",
+	[SCTP_CONNTRACK_HEARTBEAT_ACKED]  = "HEARTBEAT_ACKED",
 };
 
 const char *const dccp_states[DCCP_CONNTRACK_MAX] = {
-- 
2.26.2


             reply	other threads:[~2020-08-13 17:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 17:06 Florian Westphal [this message]
2020-08-14  9:57 ` [PATCH lnf-conntrack] conntrack: sctp: update states Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200813170630.22987-1-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.