From: Lorenzo Colitti <redacted>
Date: Mon, 8 Aug 2016 16:42:07 +0900
ping_v6_sendmsg never sets flowi6_oif, so it is not possible to
ping an IPv6 address on a different interface. Instead, it sets
flowi6_iif, which is incorrect but harmless. Also, it returns an
error if a passed-in scope ID doesn't match sk_bound_dev_if.
Get rid of the error, stop setting flowi6_iif, and support
various ways of setting oif in the same priority order used by
udpv6_sendmsg.
Tested: https://android-review.googlesource.com/#/c/254470/
Signed-off-by: Lorenzo Colitti <redacted>
We should always give sk_bound_dev_if the highest priority.
Also, we should amend, not delete, the check against the scope
ID in the sockaddr. As explained by YOSHIFUJI Hideaki.