From: Sven Eckelmann <sven@narfation.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH v3 6/6] batman-adv: debugfs: Add netns support
Date: Mon, 14 Mar 2016 16:56:57 +0100 [thread overview]
Message-ID: <58321025.0PBgHVCilp@bentobox> (raw)
In-Reply-To: <20160314140624.GA5636@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
On Monday 14 March 2016 15:06:24 Andrew Lunn wrote:
> > Matthias is against applying [1] patch 6 because it would require that
> > batman-adv supports this interface for a long(tm) time. He proposes to use
> > netlink instead.
> >
> > Andrew, do you want to change patch 6 to avoid creating the debugfs stuff in
> > non-init_net netns?
>
> I'm not sure how well that is going to work, from the user space side
> of things.
>
> In the kernel, we know if we are in init_net, or some other netns.
>
> In user space, it is not so simple. Ideally, when in some other netns
> than the default, we need all reads/writes to debugfs to fail.
Hm, this would require some checks via the the current pid on open:
net = get_net_ns_by_pid(current->pid);
... checky check via neteq(net, &init_net)...
put_net(pd->net);
> What we
> don't want is it seeing the default name spaces files, because it is
> going to get very confusing. These files refer to something which does
> not exist in the current netns.
Wait, but thats exactly what you are doing already with your default behavior
(which only creates a symlink to netns/${FUNNY_ID}/. Legacy tools will still
read the wrong information because they don't know about the new netns paths.
I thought that the debugfs stuff will be replaced with netlink and that the
current debugfs files are only there for non-namespace setups with legacy tools.
Kind regards,
Sven
[1] https://patchwork.open-mesh.org/patch/4965/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-14 15:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 18:48 [B.A.T.M.A.N.] [PATCH v3 0/6] batman-adv: Add network name space support Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 1/6] batman-adv: Introduce compat-patches support Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 2/6] batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 3/6] batman-adv: Create batman soft interfaces within correct netns Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 4/6] batman-adv: Handle parent interfaces in a different netns Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 5/6] batman-adv: Add compatibility header for linux/ns_common.h Sven Eckelmann
2016-03-13 18:50 ` [B.A.T.M.A.N.] [PATCH v3 6/6] batman-adv: debugfs: Add netns support Sven Eckelmann
2016-03-14 10:57 ` Sven Eckelmann
2016-03-14 14:06 ` Andrew Lunn
2016-03-14 15:56 ` Sven Eckelmann [this message]
2016-03-14 19:20 ` Andrew Lunn
2016-03-13 22:40 ` [B.A.T.M.A.N.] [PATCH v3 0/6] batman-adv: Add network name space support Andrew Lunn
2016-03-14 7:17 ` Sven Eckelmann
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=58321025.0PBgHVCilp@bentobox \
--to=sven@narfation.org \
--cc=andrew@lunn.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.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 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.