Message ID | 52319CC5.10902@cn.fujitsu.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, Sep 12, 2013 at 06:51:49PM +0800, Duan Jiong wrote: > From: Duan Jiong <duanj.fnst@cn.fujitsu.com> > > And when dealing with redirect message, the err shoud > be assigned to 0. > > Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> > --- > net/ipv6/raw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c > index 58916bb..6138199 100644 > --- a/net/ipv6/raw.c > +++ b/net/ipv6/raw.c > @@ -336,7 +336,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb, > harderr = (np->pmtudisc == IPV6_PMTUDISC_DO); > } > if (type == NDISC_REDIRECT) > - ip6_sk_redirect(skb, sk); > + err = 0; > if (np->recverr) { > u8 *payload = skb->data; > if (!inet->hdrincl) Hm, I don't like the cirumstance that we first call icmpv6_err_convert at first and get back a bogus error value and later on convert it to something meaningful. Either: a) Don't call icmpv6_err_convert at all for redirects. Then we could place a WARN_ON(type == NDISC_REDIRECT) into this function to find future missuse of this function with redirects or b) handle the update of the NDISC_REDIRECT error code directly in icmpv6_err_convert. Also that you used the same headings for some commits shows that you could perhaps squash them into one patch. Otherwise I'm fine with the changes, thanks. Greetings, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
于 2013年09月13日 06:04, Hannes Frederic Sowa 写道: > On Thu, Sep 12, 2013 at 06:51:49PM +0800, Duan Jiong wrote: >> From: Duan Jiong <duanj.fnst@cn.fujitsu.com> >> >> And when dealing with redirect message, the err shoud >> be assigned to 0. >> >> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> >> --- >> net/ipv6/raw.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c >> index 58916bb..6138199 100644 >> --- a/net/ipv6/raw.c >> +++ b/net/ipv6/raw.c >> @@ -336,7 +336,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb, >> harderr = (np->pmtudisc == IPV6_PMTUDISC_DO); >> } >> if (type == NDISC_REDIRECT) >> - ip6_sk_redirect(skb, sk); >> + err = 0; >> if (np->recverr) { >> u8 *payload = skb->data; >> if (!inet->hdrincl) > > Hm, I don't like the cirumstance that we first call icmpv6_err_convert at > first and get back a bogus error value and later on convert it to something > meaningful. > > Either: > a) Don't call icmpv6_err_convert at all for redirects. Then we could > place a WARN_ON(type == NDISC_REDIRECT) into this function to find future > missuse of this function with redirects or > > b) handle the update of the NDISC_REDIRECT error code directly in > icmpv6_err_convert. > > Also that you used the same headings for some commits shows that you could > perhaps squash them into one patch. > > Otherwise I'm fine with the changes, thanks. > Thanks for you help, i will modify my patch. Thanks, Duan -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 58916bb..6138199 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -336,7 +336,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb, harderr = (np->pmtudisc == IPV6_PMTUDISC_DO); } if (type == NDISC_REDIRECT) - ip6_sk_redirect(skb, sk); + err = 0; if (np->recverr) { u8 *payload = skb->data; if (!inet->hdrincl)