Message ID | 1383879310-22792-4-git-send-email-wangweidong1@huawei.com |
---|---|
State | Deferred, archived |
Delegated to: | David Miller |
Headers | show |
On 11/07/2013 09:55 PM, Wang Weidong wrote: > I found that free the old parameters after update the peer parameters. > So we should free the new ssnmap which not updated. > > Signed-off-by: Wang Weidong <wangweidong1@huawei.com> > --- > net/sctp/associola.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/net/sctp/associola.c b/net/sctp/associola.c > index 2d53d4c..bca1ad1 100644 > --- a/net/sctp/associola.c > +++ b/net/sctp/associola.c > @@ -1223,6 +1223,10 @@ void sctp_assoc_update(struct sctp_association *asoc, > } > } > > + /* if we don't update the ssnmap, we should free it. */ > + if (new->ssnmap) > + sctp_ssnmap_free(new->ssnmap); > + > /* SCTP-AUTH: Save the peer parameters from the new assocaitions > * and also move the association shared keys over > */ > Not necessary. This will be done when the 'new' association is destroyed. -vlad -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2013/11/8 11:49, Vlad Yasevich wrote: > On 11/07/2013 09:55 PM, Wang Weidong wrote: >> I found that free the old parameters after update the peer parameters. >> So we should free the new ssnmap which not updated. >> >> Signed-off-by: Wang Weidong <wangweidong1@huawei.com> >> --- >> net/sctp/associola.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/net/sctp/associola.c b/net/sctp/associola.c >> index 2d53d4c..bca1ad1 100644 >> --- a/net/sctp/associola.c >> +++ b/net/sctp/associola.c >> @@ -1223,6 +1223,10 @@ void sctp_assoc_update(struct sctp_association *asoc, >> } >> } >> >> + /* if we don't update the ssnmap, we should free it. */ >> + if (new->ssnmap) >> + sctp_ssnmap_free(new->ssnmap); >> + >> /* SCTP-AUTH: Save the peer parameters from the new assocaitions >> * and also move the association shared keys over >> */ >> > > Not necessary. This will be done when the 'new' association is destroyed. > > -vlad > Yeah, it is not necessary done in sctp_assoc_update. Thanks. > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 2d53d4c..bca1ad1 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -1223,6 +1223,10 @@ void sctp_assoc_update(struct sctp_association *asoc, } } + /* if we don't update the ssnmap, we should free it. */ + if (new->ssnmap) + sctp_ssnmap_free(new->ssnmap); + /* SCTP-AUTH: Save the peer parameters from the new assocaitions * and also move the association shared keys over */
I found that free the old parameters after update the peer parameters. So we should free the new ssnmap which not updated. Signed-off-by: Wang Weidong <wangweidong1@huawei.com> --- net/sctp/associola.c | 4 ++++ 1 file changed, 4 insertions(+)