summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2014-06-22 16:32:41 +0000
committertuexen <tuexen@FreeBSD.org>2014-06-22 16:32:41 +0000
commit1831342aca6c82680727d03738f208fa61607bb0 (patch)
tree266477998c56d7a5a8e8dfaf2f1898d78cfa16f3
parent39c4d6744939217a706f4234967e8eb6f65199d5 (diff)
downloadFreeBSD-src-1831342aca6c82680727d03738f208fa61607bb0.zip
FreeBSD-src-1831342aca6c82680727d03738f208fa61607bb0.tar.gz
MFC r263922:
Handle an edge case of address management similar to TCP. This needs to be reconsidered when the address handling will be reimplemented. The patch is from rrs@.
-rw-r--r--sys/netinet/sctp_pcb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 08a8577..3dbaa8a 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -772,7 +772,14 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr,
}
SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", (void *)sctp_ifap);
sctp_ifap->localifa_flags &= SCTP_ADDR_VALID;
- sctp_ifap->localifa_flags |= SCTP_BEING_DELETED;
+ /*
+ * We don't set the flag. This means that the structure will
+ * hang around in EP's that have bound specific to it until
+ * they close. This gives us TCP like behavior if someone
+ * removes an address (or for that matter adds it right
+ * back).
+ */
+ /* sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; */
vrf->total_ifa_count--;
LIST_REMOVE(sctp_ifap, next_bucket);
sctp_remove_ifa_from_ifn(sctp_ifap);
OpenPOWER on IntegriCloud