net: Set ping saddr after we successfully get the ping port
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 25 Aug 2020 11:33:22 +0000 (07:33 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2020 13:18:13 +0000 (06:18 -0700)
commit0316a211168dd94c4d3b81c91e76fac4f2714544
tree3d24c4d0e7b66153b872703202d4f12192537537
parentcca852831c0672e1b2da590c23764b5ad149cbb7
net: Set ping saddr after we successfully get the ping port

We can defer set ping saddr until we successfully get the ping port. So we
can avoid clear saddr when failed. Since ping_clear_saddr() is not used
anymore now, remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c