From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Xin Long <lucien.xin@gmail.com>, network dev <netdev@vger.kernel.org>
Cc: mleitner@redhat.com, davem@davemloft.net
Subject: Re: [PATCH net] sctp: asconf process should treat multiple address parameter as unrecognized parameter
Date: Mon, 24 Aug 2015 15:19:59 +0300 [thread overview]
Message-ID: <55DB0BEF.2030909@cogentembedded.com> (raw)
In-Reply-To: <13ab95079875febb3985b32d0fdaf587c6de1973.1440410850.git.lucien.xin@gmail.com>
Hello.
On 8/24/2015 1:07 PM, Xin Long wrote:
> currently, we sctp_walk_params(), if we encounter the address parameter, we will
> skip them, we do not care about how many addr params are there.
>
> but the params of ASCONF chunk should consist of one *Address Parameter* and one
> or more *ASCONF Parameters*.
>
> so we will process multiple address parameters as unrecognized parameter and
> send error cause to peer.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> ---
> net/sctp/sm_make_chunk.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index 06320c8..0ee5ca7 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -3217,10 +3217,18 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
>
> /* Process the TLVs contained within the ASCONF chunk. */
> sctp_walk_params(param, addip, addip_hdr.params) {
> - /* Skip preceeding address parameters. */
> + /* Skip preceeding address parameters.
> + * process multi-addrparam as unrecognized parameters
> + */
> if (param.p->type == SCTP_PARAM_IPV4_ADDRESS ||
> - param.p->type == SCTP_PARAM_IPV6_ADDRESS)
> + param.p->type == SCTP_PARAM_IPV6_ADDRESS) {
> + if(param.addr != addr_param) {
Space needed after *if*.
> + all_param_pass = false;
> + sctp_add_asconf_response(asconf_ack, 0,
> + SCTP_ERROR_UNKNOWN_PARAM, param.v);
Please start the continuation line under 'asconf_ack'.
[...]
MBR, Sergei
next prev parent reply other threads:[~2015-08-24 12:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 10:07 [PATCH net] sctp: asconf process should treat multiple address parameter as unrecognized parameter Xin Long
2015-08-24 12:19 ` Sergei Shtylyov [this message]
2015-08-24 17:49 ` Vlad Yasevich
2015-08-25 12:39 ` lucien xin
2015-08-25 12:43 ` lucien xin
2015-08-25 14:18 ` Marcelo Ricardo Leitner
2015-08-25 16:20 ` Vlad Yasevich
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=55DB0BEF.2030909@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=mleitner@redhat.com \
--cc=netdev@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 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).