summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_asconf.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2010-09-15 23:10:45 +0000
committertuexen <tuexen@FreeBSD.org>2010-09-15 23:10:45 +0000
commit790dcded4d97b3159e5d8054665dac9b6202a524 (patch)
treea6cd85d329bcee3455f52bea51bdb692ec388986 /sys/netinet/sctp_asconf.c
parent989dcde2a6d367ac9159492566c30f0d0f398152 (diff)
downloadFreeBSD-src-790dcded4d97b3159e5d8054665dac9b6202a524.zip
FreeBSD-src-790dcded4d97b3159e5d8054665dac9b6202a524.tar.gz
Delay the assignment of a path for DATA chunk until they hit
the sent_queue. Honor a given path when the SCTP_ADDR_OVER flag is set. MFC after: 2 weeks.
Diffstat (limited to 'sys/netinet/sctp_asconf.c')
-rw-r--r--sys/netinet/sctp_asconf.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index ee5dc0d..288381d 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -581,8 +581,8 @@ sctp_process_asconf_set_primary(struct mbuf *m,
}
if (sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_BASE)) {
- sctp_move_chunks_from_deleted_prim(stcb,
- stcb->asoc.primary_destination);
+ sctp_move_chunks_from_net(stcb,
+ stcb->asoc.deleted_primary);
}
sctp_delete_prim_timer(stcb->sctp_ep, stcb,
stcb->asoc.deleted_primary);
@@ -1041,47 +1041,6 @@ sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct sctp_ifn *ifn)
}
}
-void
-sctp_move_chunks_from_deleted_prim(struct sctp_tcb *stcb, struct sctp_nets *dst)
-{
- struct sctp_association *asoc;
- struct sctp_stream_out *outs;
- struct sctp_tmit_chunk *chk;
- struct sctp_stream_queue_pending *sp;
-
- if (dst->dest_state & SCTP_ADDR_UNCONFIRMED) {
- return;
- }
- if (stcb->asoc.deleted_primary == NULL) {
- return;
- }
- asoc = &stcb->asoc;
-
- /*
- * now through all the streams checking for chunks sent to our bad
- * network.
- */
- TAILQ_FOREACH(outs, &asoc->out_wheel, next_spoke) {
- /* now clean up any chunks here */
- TAILQ_FOREACH(sp, &outs->outqueue, next) {
- if (sp->net == asoc->deleted_primary) {
- sctp_free_remote_addr(sp->net);
- sp->net = dst;
- atomic_add_int(&dst->ref_count, 1);
- }
- }
- }
- /* Now check the pending queue */
- TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) {
- if (chk->whoTo == asoc->deleted_primary) {
- sctp_free_remote_addr(chk->whoTo);
- chk->whoTo = dst;
- atomic_add_int(&dst->ref_count, 1);
- }
- }
-
-}
-
void
sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet)
@@ -2080,13 +2039,11 @@ sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
struct sctp_asconf_iterator *asc;
struct sctp_ifa *ifa;
struct sctp_laddr *l;
- int type;
int cnt_invalid = 0;
asc = (struct sctp_asconf_iterator *)ptr;
LIST_FOREACH(l, &asc->list_of_work, sctp_nxt_addr) {
ifa = l->ifa;
- type = l->action;
if (ifa->address.sa.sa_family == AF_INET6) {
/* invalid if we're not a v6 endpoint */
if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) {
OpenPOWER on IntegriCloud