From: Al Viro Date: Tue, 21 Nov 2006 01:24:21 +0000 (-0800) Subject: [SCTP]: Don't bother setting sin_port in ->from_sk(). X-Git-Tag: v2.6.20-rc1~34^2~40^2~189 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dcdbd9579c944bb833f95a7f276d01f49161734;p=linux-2.6 [SCTP]: Don't bother setting sin_port in ->from_sk(). ... the only caller will overwrite immediately Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index e6bb08767b..8e2b1e4ec6 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -371,7 +371,7 @@ static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb, static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk) { addr->v6.sin6_family = AF_INET6; - addr->v6.sin6_port = inet_sk(sk)->num; + addr->v6.sin6_port = 0; addr->v6.sin6_addr = inet6_sk(sk)->rcv_saddr; } diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 807c97da33..c6297744a4 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -272,7 +272,7 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb, static void sctp_v4_from_sk(union sctp_addr *addr, struct sock *sk) { addr->v4.sin_family = AF_INET; - addr->v4.sin_port = inet_sk(sk)->num; + addr->v4.sin_port = 0; addr->v4.sin_addr.s_addr = inet_sk(sk)->rcv_saddr; }