From: <daj...@no...> - 2003-02-26 02:27:57
|
I see. Thanks for your clarification.=20 -----Original Message----- From: ext Jon Grimm [mailto:jg...@us...] Sent: 25 February 2003 23:38 To: Zhang Dajiang (Nokia-RD/Beijing) Cc: ard...@in...; sr...@us...; = Lks...@li...; Huang Hui (Nokia-RD/Beijing) Subject: Re: a question about the patch of stale cookie daj...@no... wrote: > Hi, ardelle, Jon & sridhar >=20 Hi back to you! Good to hear from you again Dajaing. > I'm porting patch 638235 stale cookie support to our implementation. = Here are some questions: > 1. why not combine sctp_sf_cookie_echoed_err with = sctp_sf_do_5_2_6_stale? I think they are just split out to allow processing of some other error=20 besides stale cookie. However, I think that code is a little broke, in = that its not bumping the INIT error counter for non-stale cookie errors. > 2. in net/sctp/input.c, our code is as following in case there are = more than one error cause in ERROR chunk. Do you think so? > if (ch->type =3D=3D SCTP_CID_ERROR) { > /* Need to check the "Stale cookie" ERROR. */ > uint8_t *err_end; > =20 > err =3D (sctp_errhdr_t* )((uint8_t *)ch + = sizeof(sctp_chunkhdr_t)); > do { > err_end =3D ((uint8_t *)err) + = WORD_ROUND(ntohs(err->length)); >=20 > if (SCTP_ERROR_STALE_COOKIE =3D=3D err->cause) { > goto discard; > } > } while (err_end < ch_end); > return 0; > } =20 Yes. This sounds right. In a similar vein, this (loop) seems to be=20 needed in sctp_sf_cookie_echo_err & possible other places too? > 3. in net/sctp/sm_statetable.c, the code in the patch is=20 >=20 > /* SCTP_STATE_COOKIE_WAIT */ \ > {.fn =3D sctp_sf_not_impl, .name =3D "sctp_sf_not_impl"}, \ > /* SCTP_STATE_COOKIE_ECHOED */ \ > - {.fn =3D sctp_sf_not_impl, .name =3D "sctp_sf_not_impl"}, \ > + {.fn =3D sctp_sf_cookie_echoed_err, .name =3D = "sctp_sf_cookie_echoed_err"}, \ > /* SCTP_STATE_ESTABLISHED */ \ > {.fn =3D sctp_sf_operr_notify, .name =3D "sctp_sf_operr_notify"}, \ > /* SCTP_STATE_SHUTDOWN_PENDING */ \=09 >=20 > why not use sctp_sf_operr_notify in case the error cause isn't STALE = COOKIE but others(e.g. Out of Resource)? >=20 How do you know the error cause is not STALE-COOKIE at this point?=20 Regardless, I'm not sure we want to send Op-Errs up the stack as we=20 haven't yet reported as associd to the application. Not a problem for=20 TCP-style sockets (as they don't use associd.) However, SCTP_CANT_START_ASSOC notification can report the ERROR cause.=20 This is something we should be doing, which I don't think we are. -jon > BR > Dajiang >=20 |