From: Vlad Yasevich <vyasevic@redhat.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
lucien xin <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>
Subject: Re: [PATCH net] sctp: asconf process should treat multiple address parameter as unrecognized parameter
Date: Tue, 25 Aug 2015 12:20:20 -0400 [thread overview]
Message-ID: <55DC95C4.9010208@redhat.com> (raw)
In-Reply-To: <20150825141859.GE1873@localhost.localdomain>
On 08/25/2015 10:18 AM, Marcelo Ricardo Leitner wrote:
> On Tue, Aug 25, 2015 at 08:43:10PM +0800, lucien xin wrote:
>> On Tue, Aug 25, 2015 at 8:39 PM, lucien xin <lucien.xin@gmail.com> wrote:
>>>>
>>>> I think it would be much better to catch this in the validation stage.
>>>> If an implementation inserts multiple address parameters, we don't really know
>>>> which one we should be using.
>>>>
>>>
>>> the params of ASCONF chunk should consist of one *Address Parameter* and one
>>> or more *ASCONF Parameters*. besides, the address parameter should be in the
>>> beginning. so the first one must be our choice.
>
> That's not necessarily true. You're assuming the first is the best but
> that's not ensured anywhere as RFC doesn't allow multiple parameteres in
> there.
>
> That also puts the entire asconf in question, because if it needed an
> address parameter and now it has many and you don't know which one you
> should use, you actually have none, and the needed parameter is thus
> missing.
>
>>> if we cat this in the validation stage, I think it will be hard to treat it as a
>>> unrecognized parameter,
>> because *unrecognized parameter* cause packet need to be built in
>> sctp_process_asconf(),
>> as current linux's implementation.
>
> I agree with Vlad, but yeah, it may make error reporting harder.
> Although I don't have any issue if we just fall through the current error
> handling for bad asconf chunks, which aborts the association due to
> param len violation. Vlad?
I've been looking at the spec and the spec does not make any requirements on the
the number of address parameters present. The only thing we have to draw any
additional requirements from is the format of the ASCONF message.
That format provides space for a single address parameter and doesn't to include
any options data between it and and ASCONF parameters. Based on that, I would
argue that inclusion of multiple Address Parameters in the ASCONF message is a
violation of ASCONF protocol and should be dealt with the same as all the other
violations we have.
I believe the above would make things a lot simpler.
-vlad
> Marcelo
>
prev parent reply other threads:[~2015-08-25 16:20 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
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 [this message]
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=55DC95C4.9010208@redhat.com \
--to=vyasevic@redhat.com \
--cc=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.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).