svn commit: r267682 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri Jun 20 17:45:01 UTC 2014
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) {
More information about the svn-src-head
mailing list