ipv4: sendto/hdrincl: don't use destination address found in header
ipv4: sendto/hdrincl: don't use destination address found in header

[ Upstream commit c27c9322d015dc1d9dfdf31724fca71c0476c4d1 ]

ipv4: raw_sendmsg: don't use header's destination address

A sendto() regression was bisected and found to start with commit
f8126f1d5136be1 (ipv4: Adjust semantics of rt->rt_gateway.)

The problem is that it tries to ARP-lookup the constructed packet's
destination address rather than the explicitly provided address.

Fix this using FLOWI_FLAG_KNOWN_NH so that given nexthop is used.

cf. commit 2ad5b9e4bd314fc685086b99e90e5de3bc59e26b

Reported-by: Chris Clark <9dac15967f462e3756b0fd0ee997d2ba828e9507@alcatel-lucent.com>
Bisected-by: Chris Clark <9dac15967f462e3756b0fd0ee997d2ba828e9507@alcatel-lucent.com>
Tested-by: Chris Clark <9dac15967f462e3756b0fd0ee997d2ba828e9507@alcatel-lucent.com>
Suggested-by: Julian Anastasov <84572ef2253ef81e2d8cd8c65849f4d9a3881f47@ssi.bg>
Signed-off-by: Chris Clark <9dac15967f462e3756b0fd0ee997d2ba828e9507@alcatel-lucent.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas