Subject: Re: [PATCH net] sctp: asconf process should treat multiple address parameter as unrecognized parameter

From: Marcelo Ricardo Leitner <[email-masked]>
Date: Tue, 25 Aug 2015 11:18:59 -0300

On Tue, Aug 25, 2015 at 08:43:10PM +0800, lucien xin wrote:
> On Tue, Aug 25, 2015 at 8:39 PM, lucien xin <[email-masked]> 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?

  Marcelo