net: ipv6: Fix ping to link-local addresses.
authorLorenzo Colitti <lorenzo@google.com>
Fri, 12 Aug 2016 16:13:38 +0000 (01:13 +0900)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 08:56:20 +0000 (14:26 +0530)
commit0e806c83bca02211f6b2e3de31df085eb4cf3508
tree9d4c28bcccfadf93fcfaba52a1be52eaafb7e364
parenta270309c905338503f94a104178a3175f75f57c6
net: ipv6: Fix ping to link-local addresses.

ping_v6_sendmsg does not set flowi6_oif in response to
sin6_scope_id or sk_bound_dev_if, so it is not possible to use
these APIs to ping an IPv6 address on a different interface.
Instead, it sets flowi6_iif, which is incorrect but harmless.

Stop setting flowi6_iif, and support various ways of setting oif
in the same priority order used by udpv6_sendmsg.

[Backport of net 5e457896986e16c440c97bb94b9ccd95dd157292]

Bug: 29370996
Change-Id: Ibe1b9434c00ed96f1e30acb110734c6570b087b8
Tested: https://android-review.googlesource.com/#/c/254470/
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ping.c