summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/sctp6_usrreq.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2014-09-18 08:58:22 +0000
committertuexen <tuexen@FreeBSD.org>2014-09-18 08:58:22 +0000
commit1a3a68be7ff5adc1189ddd10e93af0cab3a5e51c (patch)
tree3aa46bf5184ddc231a9f312ae6a6558b6033a051 /sys/netinet6/sctp6_usrreq.c
parent7ced298ca7bee66ba2a5f169cd74aece9cf568e0 (diff)
downloadFreeBSD-src-1a3a68be7ff5adc1189ddd10e93af0cab3a5e51c.zip
FreeBSD-src-1a3a68be7ff5adc1189ddd10e93af0cab3a5e51c.tar.gz
MFC r270673:
Announce SCTP support in the kern.features sysctl variables. MFC r270859: Enable SCTP support. It runs perfectly fine on a Wandboard quad. MFC r271204 with manual intervention: Fix the handling of sysctl variables when used with VIMAGE. While there do some cleanup of the code. MFC r271209: Fix a leak of an address, if the address is scheduled for removal and the stack is torn down. Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the issue. MFC r271219: Use SYSCTL_PROC instead of SYSCTL_VNET_PROC. Suggested by: glebius@ MFC r271221: Use union sctp_sockstore instead of struct sockaddr_storage. This eliminates some warnings when building in userland. Thanks to Patrick Laimbock for reporting this issue. Remove also some unnecessary casts. There should be no functional change. MFC r271228: Address another warnings reported by Patrick Laimbock when compiling in userspace. While there, improve consistency. MFC r271230: Address warnings generated by the clang analyzer. Approved by: re (kib)
Diffstat (limited to 'sys/netinet6/sctp6_usrreq.c')
-rw-r--r--sys/netinet6/sctp6_usrreq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c
index 6c9f9ee..a2393ec 100644
--- a/sys/netinet6/sctp6_usrreq.c
+++ b/sys/netinet6/sctp6_usrreq.c
@@ -844,7 +844,7 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p)
#ifdef INET
struct in6pcb *inp6;
struct sockaddr_in6 *sin6;
- struct sockaddr_storage ss;
+ union sctp_sockstore store;
#endif
@@ -928,8 +928,8 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p)
}
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
/* convert v4-mapped into v4 addr */
- in6_sin6_2_sin((struct sockaddr_in *)&ss, sin6);
- addr = (struct sockaddr *)&ss;
+ in6_sin6_2_sin(&store.sin, sin6);
+ addr = &store.sa;
}
#endif /* INET */
/* Now do we connect? */
@@ -1057,7 +1057,7 @@ sctp6_getaddr(struct socket *so, struct sockaddr **addr)
if (laddr->ifa->address.sa.sa_family == AF_INET6) {
struct sockaddr_in6 *sin_a;
- sin_a = (struct sockaddr_in6 *)&laddr->ifa->address.sin6;
+ sin_a = &laddr->ifa->address.sin6;
sin6->sin6_addr = sin_a->sin6_addr;
fnd = 1;
break;
OpenPOWER on IntegriCloud