All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wei <lw@cn.fujitsu.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH] ipv4: fix for ip_options_rcv_srr() daddr update.
Date: Wed, 09 Nov 2011 15:39:28 +0800	[thread overview]
Message-ID: <4EBA2E30.8050102@cn.fujitsu.com> (raw)

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>
---
 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.3.2

             reply	other threads:[~2011-11-09  7:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  7:39 Li Wei [this message]
2011-11-09 20:59 ` [PATCH] ipv4: fix for ip_options_rcv_srr() daddr update David Miller
2011-11-15  5:40   ` Li Wei
2011-11-15  6:35     ` David Miller
2011-11-15  7:26       ` Li Wei
2011-11-15  7:28         ` David Miller
2011-11-15  7:51           ` Li Wei
2011-11-15  8:23             ` David Miller
2011-11-15  8:29               ` Li Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBA2E30.8050102@cn.fujitsu.com \
    --to=lw@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.