aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d1fbd1f5c6d1..d08bafd4439e 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -252,7 +252,7 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
252 int is_saddr) 252 int is_saddr)
253{ 253{
254 void *from; 254 void *from;
255 __u16 *port; 255 __be16 *port;
256 struct sctphdr *sh; 256 struct sctphdr *sh;
257 257
258 port = &addr->v4.sin_port; 258 port = &addr->v4.sin_port;
@@ -260,10 +260,10 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
260 260
261 sh = (struct sctphdr *) skb->h.raw; 261 sh = (struct sctphdr *) skb->h.raw;
262 if (is_saddr) { 262 if (is_saddr) {
263 *port = ntohs(sh->source); 263 *port = sh->source;
264 from = &skb->nh.iph->saddr; 264 from = &skb->nh.iph->saddr;
265 } else { 265 } else {
266 *port = ntohs(sh->dest); 266 *port = sh->dest;
267 from = &skb->nh.iph->daddr; 267 from = &skb->nh.iph->daddr;
268 } 268 }
269 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr)); 269 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr));