ipv4: fix for ip_options_rcv_srr() daddr update.
authorLi Wei <lw@cn.fujitsu.com>
Tue, 8 Nov 2011 21:39:28 +0000 (21:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Nov 2011 20:59:00 +0000 (15:59 -0500)
When opt->srr_is_hit is set skb_rtable(skb) has been updated for
'nexthop' and iph->daddr should always equals to skb_rtable->rt_dst
holds, We need update iph->daddr either.

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

index ec93335901ddc45d09f7c85c53270ea9a6772207..05d20cca9d66efd2500268a3d0ba4a31117739e7 100644 (file)
@@ -640,6 +640,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
        }
        if (srrptr <= srrspace) {
                opt->srr_is_hit = 1;
+               iph->daddr = nexthop;
                opt->is_changed = 1;
        }
        return 0;