From: Florian Westphal <fw@strlen.de>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
linux-api@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH nf-next] netfilter: nf_ct_sctp: minimal multihoming support
Date: Tue, 14 Jul 2015 15:42:03 +0200 [thread overview]
Message-ID: <20150714134203.GG25674@breakpoint.cc> (raw)
In-Reply-To: <20150714122311.8DA8EA0C9A@unicorn.suse.cz>
Michal Kubecek <mkubecek@suse.cz> wrote:
> + case SCTP_CID_HEARTBEAT:
> + pr_debug("SCTP_CID_HEARTBEAT");
> + i = 9;
> + break;
> + case SCTP_CID_HEARTBEAT_ACK:
> + pr_debug("SCTP_CID_HEARTBEAT_ACK");
> + i = 10;
> + break;
> default:
> /* Other chunks like DATA, SACK, HEARTBEAT and
> its ACK do not cause a change in state */
> @@ -329,6 +351,8 @@ static int sctp_packet(struct nf_conn *ct,
> !test_bit(SCTP_CID_COOKIE_ECHO, map) &&
> !test_bit(SCTP_CID_ABORT, map) &&
> !test_bit(SCTP_CID_SHUTDOWN_ACK, map) &&
> + !test_bit(SCTP_CID_HEARTBEAT, map) &&
> + !test_bit(SCTP_CID_HEARTBEAT_ACK, map) &&
> sh->vtag != ct->proto.sctp.vtag[dir]) {
> pr_debug("Verification tag check failed\n");
> goto out;
> @@ -357,6 +381,16 @@ static int sctp_packet(struct nf_conn *ct,
> /* Sec 8.5.1 (D) */
> if (sh->vtag != ct->proto.sctp.vtag[dir])
> goto out_unlock;
> + } else if (sch->type == SCTP_CID_HEARTBEAT ||
> + sch->type == SCTP_CID_HEARTBEAT_ACK) {
> + if (ct->proto.sctp.vtag[dir] == 0) {
> + pr_debug("Setting vtag %x for dir %d\n",
> + sh->vtag, dir);
> + ct->proto.sctp.vtag[dir] = sh->vtag;
Could you please elaborate on the [dir] == 0 test?
I see this might happen for SCTP_CID_HEARTBEAT_ACK, but why is this
needed for SCTP_CID_HEARTBEAT ?
We found a conntrack entry so shouldn't the vtag[dir] already be > 0?
next prev parent reply other threads:[~2015-07-14 13:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 12:23 [PATCH nf-next] netfilter: nf_ct_sctp: minimal multihoming support Michal Kubecek
2015-07-14 13:42 ` Florian Westphal [this message]
2015-07-14 16:42 ` Michal Kubecek
2015-07-15 20:35 ` Marcelo Ricardo Leitner
2015-07-16 12:05 ` Michal Kubecek
2015-07-16 13:18 ` Marcelo Ricardo Leitner
2015-07-14 15:38 ` Pablo Neira Ayuso
2015-07-14 16:28 ` Michal Kubecek
2015-07-15 16:45 ` Pablo Neira Ayuso
2015-07-16 13:50 ` Marcelo Ricardo Leitner
2015-07-16 16:13 ` Michal Kubecek
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=20150714134203.GG25674@breakpoint.cc \
--to=fw@strlen.de \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox