From: Josh Hunt <johunt@akamai•com>
To: Hajime Tazaki <thehajime@gmail•com>, davem@davemloft•net
Cc: kuznet@ms2•inr.ac.ru, jmorris@namei•org, yoshfuji@linux-ipv6•org,
kaber@trash•net, netdev@vger•kernel.org,
sergei.shtylyov@cogentembedded•com, tom@herbertland•com
Subject: Re: [PATCH v3] ipv6: Fix protocol resubmission
Date: Wed, 10 Jun 2015 08:22:35 -0500 [thread overview]
Message-ID: <55783A1B.3070207@akamai.com> (raw)
In-Reply-To: <m2mw08kx7b.wl@gmail.com>
On 06/09/2015 11:24 PM, Hajime Tazaki wrote:
>
> Hello Josh, Dave,
>
> my mobile ipv6 test on libos failed with this commit.
>
> This commit makes a destination option header handling (i.e.,
> ipprot->handler == ipv6_destopt_rcv) failed since
> ipv6_destopt_rcv() seems to return a positive value to
> indicate to goto resubmission label.
>
> I will look for more detail.
>
> -- Hajime
Hajime
Thanks for the report. I mentioned in an earlier post this might be a
problem.
Dave, what if we restore the old behavior, but add a new label to handle
the case where the decapsulating protocol returns the nexthdr value?
Allowing for migration over to this method over time. I've pasted in a
patch doing so below.
The other solution I guess is to change how the udp handler works, but I
was hoping to keep it behaving the same as v4.
Josh
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 41a73da..a4fab24 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -212,13 +212,13 @@ static int ip6_input_finish(struct sock *sk,
struct sk_buff *skb)
*/
rcu_read_lock();
+resubmit:
idev = ip6_dst_idev(skb_dst(skb));
if (!pskb_pull(skb, skb_transport_offset(skb)))
goto discard;
nhoff = IP6CB(skb)->nhoff;
nexthdr = skb_network_header(skb)[nhoff];
-
-resubmit:
+resubmit_nexthdr:
raw = raw6_local_deliver(skb, nexthdr);
ipprot = rcu_dereference(inet6_protos[nexthdr]);
if (ipprot) {
@@ -246,9 +246,11 @@ resubmit:
goto discard;
ret = ipprot->handler(skb);
- if (ret < 0) {
- nexthdr = -ret;
+ if (ret > 0) {
goto resubmit;
+ } else if (ret < 0) {
+ nexthdr = -ret;
+ goto resubmit_nexthdr;
} else if (ret == 0) {
IP6_INC_STATS_BH(net, idev,
IPSTATS_MIB_INDELIVERS);
}
next prev parent reply other threads:[~2015-06-10 13:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 16:00 [PATCH v3] ipv6: Fix protocol resubmission Josh Hunt
2015-06-08 16:10 ` Tom Herbert
2015-06-08 19:16 ` David Miller
2015-06-10 4:24 ` Hajime Tazaki
2015-06-10 4:53 ` YOSHIFUJI Hideaki
2015-06-10 13:22 ` Josh Hunt [this message]
2015-06-10 15:16 ` YOSHIFUJI Hideaki
2015-06-10 15:23 ` Josh Hunt
2015-06-10 15:53 ` Josh Hunt
2015-06-10 21:57 ` Josh Hunt
2015-06-10 22:30 ` David Miller
2015-06-11 13:05 ` Hajime Tazaki
2015-06-11 15:32 ` Josh Hunt
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=55783A1B.3070207@akamai.com \
--to=johunt@akamai$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jmorris@namei$(echo .)org \
--cc=kaber@trash$(echo .)net \
--cc=kuznet@ms2$(echo .)inr.ac.ru \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=thehajime@gmail$(echo .)com \
--cc=tom@herbertland$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox