ipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr.
authorLi Wei <lw@cn.fujitsu.com>
Thu, 9 Feb 2012 21:15:25 +0000 (21:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Mar 2012 00:31:02 +0000 (16:31 -0800)
commit763fe579c154a7bcff5f40788b3b32ada3a1f8db
treebbc79590c3d736b00e7df6af93530321ae120208
parent017d762758b89e117b10c21a8490b16e93cf487b
ipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr.

[ Upstream commit 5dc7883f2a7c25f8df40d7479687153558cd531b ]

This patch fix a bug which introduced by commit ac8a4810 (ipv4: Save
nexthop address of LSRR/SSRR option to IPCB.).In that patch, we saved
the nexthop of SRR in ip_option->nexthop and update iph->daddr until
we get to ip_forward_options(), but we need to update it before
ip_rt_get_source(), otherwise we may get a wrong src.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_options.c