Date: Sun, 6 Jun 2021 23:43:01 GMT From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 50948b57070f - stable/13 - sctp: improve address list scanning Message-ID: <202106062343.156Nh1tm092044@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=50948b57070f91d8c99807bb7a698659bfbda6b4 commit 50948b57070f91d8c99807bb7a698659bfbda6b4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2021-05-03 00:50:05 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2021-06-02 21:54:34 +0000 sctp: improve address list scanning If the alternate address has to be removed, force the stack to find a new one, if it is still needed. (cherry picked from commit 8b3d0f6439fa27f0d37a9a7b9d27bbfdfdf487c4) --- sys/netinet/sctp_pcb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index f4264ab387f1..08acccbf9185 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -6562,11 +6562,15 @@ next_param: /* remove and free it */ stcb->asoc.numnets--; TAILQ_REMOVE(&stcb->asoc.nets, net, sctp_next); - sctp_free_remote_addr(net); + if (net == stcb->asoc.alternate) { + sctp_free_remote_addr(stcb->asoc.alternate); + stcb->asoc.alternate = NULL; + } if (net == stcb->asoc.primary_destination) { stcb->asoc.primary_destination = NULL; sctp_select_primary_destination(stcb); } + sctp_free_remote_addr(net); } } if ((stcb->asoc.ecn_supported == 1) &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106062343.156Nh1tm092044>