[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111108.120621.691425261290061620.davem@davemloft.net>
Date: Tue, 08 Nov 2011 12:06:21 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: lw@...fujitsu.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4: fix a bug in SRR option matching.
From: Li Wei <lw@...fujitsu.com>
Date: Tue, 08 Nov 2011 15:56:40 +0800
> Since commit 7be799a7 (ipv4: Remove rt->rt_dst reference from
> ip_forward_options()) and commit 0374d9ce (ipv4: Kill spurious
> write to iph->daddr in ip_forward_options()) we use iph->daddr
> for SRR option matching and assume iph->daddr equals to rt->rt_dst,
> Unfortunately skb_rtable(skb) has been updated in ip_options_rcv_srr()
> for the nexthop in SRR option but iph->daddr *not* updated,
> We should use the updated rt->rt_dst for SRR option matching
> and update iph->daddr here.
>
> Signed-off-by: Li Wei <lw@...fujitsu.com>
Please replace this by whatever logic ip_options_rcv_srr() uses to
determine the destination address.
I would strongly encourage you, when fixing bugs like this, to use
as a hint the intentions of the commit which introduced the bug. And
try as hard as possible to retain the goals of the guilty commit.
In this case, that means not introducing references to rt->rt_dst
back into the code.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists