netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/13 net-3.1-stable] ipv4: fix for ip_options_rcv_srr() daddr update.
@ 2011-12-06 21:33 David Miller
  0 siblings, 0 replies; only message in thread
From: David Miller @ 2011-12-06 21:33 UTC (permalink / raw)
  To: netdev


From: Li Wei <lw@cn.fujitsu.com>

[ Upstream commit b12f62efb8ec0b9523bdb6c2d412c07193086de9 ]

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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index ec93335..05d20cc 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -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;
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-06 21:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 21:33 [PATCH 3/13 net-3.1-stable] ipv4: fix for ip_options_rcv_srr() daddr update David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).