aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-12-20 17:08:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:20 -0500
commit42e30bf3463cd37d73839376662cb79b4d5c416c (patch)
tree18489b96b4af4ec12ebafc8ea1cb9fd3e6756ce1 /net/sctp/associola.c
parent6afd2e83cd86b17b074e1854d063b8ec590d7f5b (diff)
[SCTP]: Handle the wildcard ADD-IP Address parameter
The Address Parameter in the parameter list of the ASCONF chunk may be a wildcard address. In this case special processing is required. For the 'add' case, the source IP of the packet is added. In the 'del' case, all addresses except the source IP of packet are removed. In the "mark primary" case, the source address is marked as primary. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r--net/sctp/associola.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 33ae9b01131e..61bebb9b96e6 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -730,6 +730,23 @@ struct sctp_transport *sctp_assoc_lookup_paddr(
730 return NULL; 730 return NULL;
731} 731}
732 732
733/* Remove all transports except a give one */
734void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc,
735 struct sctp_transport *primary)
736{
737 struct sctp_transport *temp;
738 struct sctp_transport *t;
739
740 list_for_each_entry_safe(t, temp, &asoc->peer.transport_addr_list,
741 transports) {
742 /* if the current transport is not the primary one, delete it */
743 if (t != primary)
744 sctp_assoc_rm_peer(asoc, t);
745 }
746
747 return;
748}
749
733/* Engage in transport control operations. 750/* Engage in transport control operations.
734 * Mark the transport up or down and send a notification to the user. 751 * Mark the transport up or down and send a notification to the user.
735 * Select and update the new active and retran paths. 752 * Select and update the new active and retran paths.