sctp: move skb_dst_set() a bit downwards in sctp_packet_transmit()
authorwangweidong <wangweidong1@huawei.com>
Thu, 26 Dec 2013 05:55:56 +0000 (13:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 19:31:44 +0000 (14:31 -0500)
commit0438816efd86c764d5544bf52e769604062316b3
treef7d505f16aec9a072e934dbc8dc2c79c4fd229cd
parent6a031f67c83aa175aedd10d4ae64750415ab57b0
sctp: move skb_dst_set() a bit downwards in sctp_packet_transmit()

skb_dst_set will use dst, if dst is NULL although is not a problem,
then goto the 'no_route' and free nskb, so do the skb_dst_set is pointless.
so move the skb_dst_set after dst check.
Remove the unnecessary initialization as well.

v2: fix the subject line because it would confuse people,
    as pointed out by Daniel.

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/output.c