[SCTP]: Fix getsockname for sctp when an ipv6 socket accepts a connection from

an ipv4 socket.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Neil Horman 2005-12-02 20:32:29 -08:00 committed by David S. Miller
parent 6736dc35e9
commit bf031fff1f

View file

@ -261,7 +261,8 @@ void sctp_transport_route(struct sctp_transport *transport,
* association's active path for getsockname().
*/
if (asoc && (transport == asoc->peer.active_path))
af->to_sk_saddr(&transport->saddr, asoc->base.sk);
opt->pf->af->to_sk_saddr(&transport->saddr,
asoc->base.sk);
} else
transport->pmtu = SCTP_DEFAULT_MAXSEGMENT;
}