[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121109085444.GF22290@secunet.com>
Date: Fri, 9 Nov 2012 09:54:44 +0100
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Duan Jiong <djduanjiong@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: fix the bug when propagating Redirect Message
On Wed, Oct 24, 2012 at 06:54:10AM +0200, Steffen Klassert wrote:
> On Tue, Oct 23, 2012 at 11:26:25PM +0800, Duan Jiong wrote:
> > + while (opt_len) {
> > + int l;
> > +
> > + if (opt_len < sizeof(struct nd_opt_hdr)) {
> > + return;
> > + }
> > + l = nd_opt->nd_opt_len << 3;
> > + if (opt_len < l || l == 0) {
> > + return;
> > + }
> > + if (nd_opt->nd_opt_type == ND_OPT_REDIRECT_HDR) {
> > + __skb_pull(skb, ndisc_head_len + opt_offset + 8);
> > + break;
> > + }
> > + opt_len -= l;
> > + nd_opt = ((void *)nd_opt) + 1;
> > + opt_offset += 1;
> > + }
>
> Instead of the above loop, you could use ndisc_parse_options().
> This does the same what you are doing here and it would make it
> a bit clearer what's going on.
>
Duan, are you going to update your patches? We really need fixes
for the problems you have discovered.
Thanks!
--
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