]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd579ccccbcdcf87d00b10f71294757c170d6e786
treef7d505f16aec9a072e934dbc8dc2c79c4fd229cd
parent002d699ad8093ba0e2619fbf80f2ba22c6b19ee4
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