From: Alexander Mihalicyn <alexander@mihalicyn.com>
To: Roi Dayan <roid@nvidia.com>
Cc: patchwork-bot+netdevbpf@kernel.org, netdev@vger.kernel.org,
dsahern@gmail.com, stephen@networkplumber.org
Subject: Re: [PATCHv5 iproute2] ip route: ignore ENOENT during save if RT_TABLE_MAIN is being dumped
Date: Sun, 11 Jul 2021 14:12:43 +0300 [thread overview]
Message-ID: <CAJqdLrqCMsXuYKjzD8_kreZe2NzK1tek550Tmth2XiGoOxjLcg@mail.gmail.com> (raw)
In-Reply-To: <d08ccca0-e399-4a8f-d8f9-62251959d716@nvidia.com>
Thanks, Roi.
I will send a patch soon.
On Sun, Jul 11, 2021 at 2:09 PM Roi Dayan <roid@nvidia.com> wrote:
>
>
>
> On 2021-07-11 1:59 PM, Roi Dayan wrote:
> >
> >
> > On 2021-07-07 5:50 PM, patchwork-bot+netdevbpf@kernel.org wrote:
> >> Hello:
> >>
> >> This patch was applied to iproute2/iproute2.git (refs/heads/main):
> >>
> >> On Wed, 7 Jul 2021 15:22:01 +0300 you wrote:
> >>> We started to use in-kernel filtering feature which allows to get only
> >>> needed tables (see iproute_dump_filter()). From the kernel side it's
> >>> implemented in net/ipv4/fib_frontend.c (inet_dump_fib),
> >>> net/ipv6/ip6_fib.c
> >>> (inet6_dump_fib). The problem here is that behaviour of "ip route save"
> >>> was changed after
> >>> c7e6371bc ("ip route: Add protocol, table id and device to dump
> >>> request").
> >>> If filters are used, then kernel returns ENOENT error if requested table
> >>> is absent, but in newly created net namespace even RT_TABLE_MAIN table
> >>> doesn't exist. It is really allocated, for instance, after issuing
> >>> "ip l set lo up".
> >>>
> >>> [...]
> >>
> >> Here is the summary with links:
> >> - [PATCHv5,iproute2] ip route: ignore ENOENT during save if
> >> RT_TABLE_MAIN is being dumped
> >>
> >> https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=459ce6e3d792
> >>
> >>
> >> You are awesome, thank you!
> >> --
> >> Deet-doot-dot, I am a bot.
> >> https://korg.docs.kernel.org/patchwork/pwbot.html
> >>
> >>
> >
> >
> > Hi,
> >
> > I didn't get a chance to check but after this commit the utility ss
> > is crashing from libnetlink.c
> >
> > (gdb) bt
> > #0 0x0000000000000000 in ?? ()
> > #1 0x0000000000418980 in rtnl_dump_done (a=0x7fffffffdc00, h=0x449c80)
> > at libnetlink.c:734
> > #2 rtnl_dump_filter_l (rth=rth@entry=0x7fffffffdcf0,
> > arg=arg@entry=0x7fffffffdc00) at libnetlink.c:893
> > #3 0x00000000004197a2 in rtnl_dump_filter_nc
> > (rth=rth@entry=0x7fffffffdcf0, filter=filter@entry=0x40cdf0
> > <show_one_inet_sock>,
> > arg1=arg1@entry=0x7fffffffdca0, nc_flags=nc_flags@entry=0) at
> > libnetlink.c:957
> > #4 0x0000000000406dc7 in inet_show_netlink (dump_fp=dump_fp@entry=0x0,
> > protocol=protocol@entry=255, f=0x42e900 <current_filter>) at ss.c:3638
> > #5 0x0000000000404db3 in raw_show (f=0x42e900 <current_filter>) at
> > ss.c:3939
> >
> >
> > if I revert this commit I can run the ss utility ok.
> >
> > Thanks,
> > Roi
>
> I found for me ss crashed using a->errhndlr but it could be null
> in rtnl_dump_done()
>
> I see a second usage of a->errhndlr in rtnl_dump_error()
>
>
prev parent reply other threads:[~2021-07-11 11:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 15:03 [PATCH iproute2] ip route: ignore ENOENT during save if RT_TABLE_MAIN is being dumped Alexander Mikhalitsyn
2021-06-23 15:36 ` David Ahern
2021-06-23 16:11 ` Alexander Mikhalitsyn
2021-06-24 15:28 ` [PATCHv2 " Alexander Mikhalitsyn
2021-06-24 15:36 ` Stephen Hemminger
2021-06-24 15:40 ` Alexander Mikhalitsyn
2021-06-25 10:59 ` Alexander Mikhalitsyn
2021-06-25 10:44 ` [PATCHv3 " Alexander Mikhalitsyn
2021-06-27 21:54 ` Stephen Hemminger
2021-06-28 6:31 ` Alexander Mikhalitsyn
2021-06-28 17:17 ` Stephen Hemminger
2021-06-28 17:21 ` Alexander Mikhalitsyn
2021-06-29 15:51 ` [PATCHv4 " Alexander Mikhalitsyn
2021-07-06 7:47 ` Alexander Mikhalitsyn
2021-07-06 15:34 ` Stephen Hemminger
2021-07-06 15:44 ` Alexander Mikhalitsyn
2021-07-06 16:18 ` Stephen Hemminger
2021-07-06 17:17 ` Alexander Mikhalitsyn
2021-07-07 0:05 ` Stephen Hemminger
2021-07-07 12:22 ` Alexander Mikhalitsyn
2021-07-07 14:31 ` Stephen Hemminger
2021-07-07 14:32 ` Alexander Mikhalitsyn
2021-07-07 12:09 ` [PATCHv5 " Alexander Mikhalitsyn
2021-07-07 12:22 ` Alexander Mikhalitsyn
2021-07-07 14:35 ` Stephen Hemminger
2021-07-07 14:38 ` Alexander Mikhalitsyn
2021-07-07 14:50 ` patchwork-bot+netdevbpf
2021-07-11 10:59 ` Roi Dayan
2021-07-11 11:09 ` Roi Dayan
2021-07-11 11:12 ` Alexander Mihalicyn [this message]
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=CAJqdLrqCMsXuYKjzD8_kreZe2NzK1tek550Tmth2XiGoOxjLcg@mail.gmail.com \
--to=alexander@mihalicyn.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=patchwork-bot+netdevbpf@kernel.org \
--cc=roid@nvidia.com \
--cc=stephen@networkplumber.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).