summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetinet/sctp_output.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/netinet/sctp_output.c b/netinet/sctp_output.c
index a305ea5..5ef7879 100755
--- a/netinet/sctp_output.c
+++ b/netinet/sctp_output.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 271230 2014-09-07 18:05:37Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 271670 2014-09-16 10:57:55Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -3477,7 +3477,12 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
if (ro->ro_rt == NULL) {
return (NULL);
}
+#if defined(__Userspace_os_Windows)
+ /* On Windows the sa_family is U_SHORT or ADDRESS_FAMILY */
+ fam = (sa_family_t)ro->ro_dst.sa_family;
+#else
fam = ro->ro_dst.sa_family;
+#endif
dest_is_priv = dest_is_loop = 0;
/* Setup our scopes for the destination */
switch (fam) {
@@ -11924,7 +11929,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net,int so_locked
hb->heartbeat.hb_info.time_value_1 = now.tv_sec;
hb->heartbeat.hb_info.time_value_2 = now.tv_usec;
/* Did our user request this one, put it in */
- hb->heartbeat.hb_info.addr_family = net->ro._l_addr.sa.sa_family;
+ hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family;
#ifdef HAVE_SA_LEN
hb->heartbeat.hb_info.addr_len = net->ro._l_addr.sa.sa_len;
#else