sctp: remove the unused sctp_assoc_is_match function
authorXin Long <lucien.xin@gmail.com>
Wed, 25 Apr 2018 09:46:47 +0000 (17:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Apr 2018 18:09:23 +0000 (14:09 -0400)
After Commit 4f0087812648 ("sctp: apply rhashtable api to send/recv
path"), there's no place using sctp_assoc_is_match, so remove it.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/associola.c

index a0ec462bc1a9f43ac3ca2990010f08999593a24f..05594b248e5277790cca6542c3680510739ce18b 100644 (file)
@@ -2091,10 +2091,6 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
                                  enum sctp_transport_cmd command,
                                  sctp_sn_error_t error);
 struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *, __u32);
-struct sctp_transport *sctp_assoc_is_match(struct sctp_association *,
-                                          struct net *,
-                                          const union sctp_addr *,
-                                          const union sctp_addr *);
 void sctp_assoc_migrate(struct sctp_association *, struct sock *);
 int sctp_assoc_update(struct sctp_association *old,
                      struct sctp_association *new);
index 837806dd57990af4b39147045f8eb53b5f34ec61..a8f3b088fcb2ac82f58b7d6fb8894fe712e2bc0a 100644 (file)
@@ -988,31 +988,6 @@ out:
        return match;
 }
 
-/* Is this the association we are looking for? */
-struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
-                                          struct net *net,
-                                          const union sctp_addr *laddr,
-                                          const union sctp_addr *paddr)
-{
-       struct sctp_transport *transport;
-
-       if ((htons(asoc->base.bind_addr.port) == laddr->v4.sin_port) &&
-           (htons(asoc->peer.port) == paddr->v4.sin_port) &&
-           net_eq(sock_net(asoc->base.sk), net)) {
-               transport = sctp_assoc_lookup_paddr(asoc, paddr);
-               if (!transport)
-                       goto out;
-
-               if (sctp_bind_addr_match(&asoc->base.bind_addr, laddr,
-                                        sctp_sk(asoc->base.sk)))
-                       goto out;
-       }
-       transport = NULL;
-
-out:
-       return transport;
-}
-
 /* Do delayed input processing.  This is scheduled by sctp_rcv(). */
 static void sctp_assoc_bh_rcv(struct work_struct *work)
 {