Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 17:45:01 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267682 - head/sys/netinet
Message-ID:  <201406201745.s5KHj1Nc035379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Jun 20 17:45:00 2014
New Revision: 267682
URL: http://svnweb.freebsd.org/changeset/base/267682

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

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Fri Jun 20 17:44:30 2014	(r267681)
+++ head/sys/netinet/sctp_usrreq.c	Fri Jun 20 17:45:00 2014	(r267682)
@@ -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) {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406201745.s5KHj1Nc035379>