sctp: add SCTP_ADDR_REMOVED event
authorXin Long <lucien.xin@gmail.com>
Tue, 8 Oct 2019 11:27:34 +0000 (19:27 +0800)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 Oct 2019 00:06:58 +0000 (17:06 -0700)
sctp_ulpevent_nofity_peer_addr_change() is called in
sctp_assoc_rm_peer() to send SCTP_ADDR_REMOVED event
when this transport is removed from the asoc.

This event is described in rfc6458#section-6.1.2:

  SCTP_ADDR_REMOVED:  The address is no longer part of the
     association.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/sctp/associola.c

index 55aad70bb2d36bcea22be4f48d3a8bca0a6d0f84..0d3d7ce7045e2457f56a1b4ebe292e61459d9856 100644 (file)
@@ -569,6 +569,7 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,
 
        asoc->peer.transport_count--;
 
+       sctp_ulpevent_nofity_peer_addr_change(peer, SCTP_ADDR_REMOVED, 0);
        sctp_transport_free(peer);
 }