summaryrefslogtreecommitdiffstats
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,
int is_saddr)
{
void *from;
- __u16 *port;
+ __be16 *port;
struct sctphdr *sh;
port = &addr->v4.sin_port;
@@ -260,10 +260,10 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
sh = (struct sctphdr *) skb->h.raw;
if (is_saddr) {
- *port = ntohs(sh->source);
+ *port = sh->source;
from = &skb->nh.iph->saddr;
} else {
- *port = ntohs(sh->dest);
+ *port = sh->dest;
from = &skb->nh.iph->daddr;
}
memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr));