aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index c56a438c3a1e..ce13cf20f625 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -574,11 +574,14 @@ static inline void sctp_v6_map_v4(union sctp_addr *addr)
574/* Map v4 address to v4-mapped v6 address */ 574/* Map v4 address to v4-mapped v6 address */
575static inline void sctp_v4_map_v6(union sctp_addr *addr) 575static inline void sctp_v4_map_v6(union sctp_addr *addr)
576{ 576{
577 __be16 port;
578
579 port = addr->v4.sin_port;
580 addr->v6.sin6_addr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
581 addr->v6.sin6_port = port;
577 addr->v6.sin6_family = AF_INET6; 582 addr->v6.sin6_family = AF_INET6;
578 addr->v6.sin6_flowinfo = 0; 583 addr->v6.sin6_flowinfo = 0;
579 addr->v6.sin6_scope_id = 0; 584 addr->v6.sin6_scope_id = 0;
580 addr->v6.sin6_port = addr->v4.sin_port;
581 addr->v6.sin6_addr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
582 addr->v6.sin6_addr.s6_addr32[0] = 0; 585 addr->v6.sin6_addr.s6_addr32[0] = 0;
583 addr->v6.sin6_addr.s6_addr32[1] = 0; 586 addr->v6.sin6_addr.s6_addr32[1] = 0;
584 addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff); 587 addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff);