Author: tuexen
Date: Mon Jun 23 08:38:56 2014
New Revision: 267781
URL: http://svnweb.freebsd.org/changeset/base/267781

Log:
  MFC r267682:
  
  Fix a bug in the setsockopt()-handling of the SCTP
  specific option SCTP_PEER_ADDR_THLDS: Use the
  provided address as intended.

Modified:
  stable/9/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/9/sys/netinet/sctp_usrreq.c  Mon Jun 23 08:36:48 2014        
(r267780)
+++ stable/9/sys/netinet/sctp_usrreq.c  Mon Jun 23 08:38:56 2014        
(r267781)
@@ -5642,7 +5642,7 @@ sctp_setopt(struct socket *so, int optna
                        SCTP_FIND_STCB(inp, stcb, thlds->spt_assoc_id);
                        net = NULL;
                        if (stcb) {
-                               net = sctp_findnet(stcb, (struct sockaddr 
*)&thlds->spt_assoc_id);
+                               net = sctp_findnet(stcb, (struct sockaddr 
*)&thlds->spt_address);
                        } else {
                                /*
                                 * We increment here since
@@ -5653,7 +5653,7 @@ sctp_setopt(struct socket *so, int optna
                                 */
                                SCTP_INP_INCR_REF(inp);
                                stcb = sctp_findassociation_ep_addr(&inp,
-                                   (struct sockaddr *)&thlds->spt_assoc_id,
+                                   (struct sockaddr *)&thlds->spt_address,
                                    &net, NULL, NULL);
                                if (stcb == NULL) {
                                        SCTP_INP_DECR_REF(inp);
@@ -5662,7 +5662,7 @@ sctp_setopt(struct socket *so, int optna
                        if (stcb && (net == NULL)) {
                                struct sockaddr *sa;
 
-                               sa = (struct sockaddr *)&thlds->spt_assoc_id;
+                               sa = (struct sockaddr *)&thlds->spt_address;
 #ifdef INET
                                if (sa->sa_family == AF_INET) {
 
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to