[SCTP]: Don't bother setting sin_port in ->from_sk().
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 21 Nov 2006 01:24:21 +0000 (17:24 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:27:06 +0000 (21:27 -0800)
... the only caller will overwrite immediately

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/ipv6.c
net/sctp/protocol.c

index e6bb08767b83a1fce056ff243251c53e9a2010cf..8e2b1e4ec66ebda5bade5523f4b514b17a77a8f9 100644 (file)
@@ -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;
 }
 
index 807c97da33a54a75f2b5f505ff0e9e2b020fdd86..c6297744a4ed2c6d026a957f4c30d22a12b345c5 100644 (file)
@@ -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;
 }