From: Hajime Tazaki <thehajime@gmail.com>
To: dsa@cumulusnetworks.com
Cc: steffen.klassert@secunet.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: Fix vti use case with oif in dst lookups for IPv6
Date: Tue, 20 Oct 2015 21:31:28 +0900 [thread overview]
Message-ID: <m2lhaxoh5r.wl@gmail.com> (raw)
In-Reply-To: <561AA3FA.7070001@cumulusnetworks.com>
Hello David,
sorry for the delay.
At Sun, 11 Oct 2015 12:01:30 -0600,
David Ahern wrote:
>
> On 10/11/15 8:24 AM, Hajime Tazaki wrote:
> >
> > I've faced this issue since the following patch was applied.
> >
> > commit 741a11d9e4103a8e1c590ef1280143fe654e4e33
> > Author: David Ahern <dsa@cumulusnetworks.com>
> > Date: Mon Sep 28 10:12:13 2015 -0700
> >
> > net: ipv6: Add RT6_LOOKUP_F_IFACE flag if oif is set
> >
> > I still couldn't spot which part (other than my posted call
> > graph) is broken and am not sure whether the xfrm change
> > affects or not (which I need to check the mip6 code again).
>
> Ok, this is a separate problem from what Steffen is hitting.
agree.
> >
> >> Can you apply this patch, and then run:
> >>
> >> perf record -e fib6:* -a -g
> >> perf script
> >
> > I'm using libos environment right now, so the perf trace
> > can't be used as it is.
>
> ok.
>
> Some path in raw6_sendmsg is setting fl6.flowi6_oif. Can you instrument it?
yes, this sendmsg uses non-zero flowi6_oif.
the conditions are
- sendmsg () with INET6/RAW socket (with IPPROTO_MH)
- ip6_pktinfo.ipi6_addr (fl6.saddr) and ipi6_oif
(fl6.flowi6_oif) are non-NULL.
=> ipi6_addr (fl6.saddr) is not the IP address of oif, but
another interfaces (home address of mip6)
- fib6_lookup() (in ip6_pol_route()) gives ip6_null_entry
if RT6_LOOKUP_F_IFACE isn't set at ip6_route_output, it
can look for a proper dst_entry of default route
if not, it gives EINVAL.
I'm sure that this is not the right fix for this issue, but
the following patch solves my situation.
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index df24cff4a0cb..02e86989b3cb 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1079,6 +1079,12 @@ redo_rt6_select:
fn = fib6_backtrack(fn, &fl6->saddr);
if (fn)
goto redo_rt6_select;
+ else if (strict & RT6_LOOKUP_F_IFACE) {
+ /* also consider non-interface route */
+ strict &= ~RT6_LOOKUP_F_IFACE;
+ fn = saved_fn;
+ goto redo_rt6_select;
+ }
else if (strict & RT6_LOOKUP_F_REACHABLE) {
/* also consider unreachable route */
strict &= ~RT6_LOOKUP_F_REACHABLE;
I'm trying to create a minimum reproducible code and spot
the issue but not get it yet. let me know if you find any
good idea.
-- Hajime
next prev parent reply other threads:[~2015-10-20 12:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 14:32 [PATCH net-next] net: Fix vti use case with oif in dst lookups for IPv6 David Ahern
2015-10-07 11:25 ` David Miller
2015-10-07 14:12 ` David Ahern
2015-10-09 6:54 ` Hajime Tazaki
2015-10-09 7:17 ` Steffen Klassert
2015-10-09 15:53 ` David Ahern
2015-10-09 17:27 ` David Ahern
2015-10-11 13:22 ` Hajime Tazaki
2015-10-11 13:31 ` David Ahern
2015-10-11 14:24 ` Hajime Tazaki
2015-10-11 18:01 ` David Ahern
2015-10-20 12:31 ` Hajime Tazaki [this message]
2015-10-20 17:48 ` David Ahern
2015-10-21 2:38 ` Hajime Tazaki
2015-10-12 18:49 ` David Ahern
2015-10-13 14:34 ` Steffen Klassert
2015-10-19 8:01 ` Steffen Klassert
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=m2lhaxoh5r.wl@gmail.com \
--to=thehajime@gmail.com \
--cc=dsa@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/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.