From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <a@unstable.cc>
Subject: Re: [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: Handle parent interfaces in a different netns
Date: Sun, 31 Jan 2016 14:26:38 +0100 [thread overview]
Message-ID: <76541057.mOyc0Z9Mdy@sven-edge> (raw)
In-Reply-To: <1453312110-32683-4-git-send-email-andrew@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
On Wednesday 20 January 2016 18:48:29 Andrew Lunn wrote:
> batman-adv tries to prevent the user from placing a batX soft
> interface into another batman mesh as a hard interface. It does this
> by walking up the devices list of parents and ensures they are all
> none batX interfaces. iflink can point to an interface in a different
> nameplace, so also retrieve the parents name space when finding the
> parent.
>
> Additionally, veth devices come in pairs and they are each others
> parents. Don't infinitely recurse in this situation.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> net/batman-adv/hard-interface.c | 44
> +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+),
> 2 deletions(-)
>
> diff --git a/net/batman-adv/hard-interface.c
> b/net/batman-adv/hard-interface.c index a5ce58a..8d51a4a 100644
> --- a/net/batman-adv/hard-interface.c
> +++ b/net/batman-adv/hard-interface.c
Include missing:
#include <net/rtnetlink.h>
> @@ -75,6 +75,39 @@ out:
> }
>
> /**
> + * batadv_mutual_parents - check if two devices are each others parent
> + * @net_dev - 1st parent
> + * @parent_dev - 2nd parent
> + *
> + * veth devices come in pairs and each is the parent of the other!
> + *
> + * Return true if the devices are each others parent, otherwise false
> + */
> +static bool batadv_mutual_parents(const struct net_device *dev1,
> + const struct net *dev1_net,
> + const struct net_device *dev2,
> + const struct net *dev2_net)
* What is net_dev and parent_dev?
* Missing parameter docs are:
- dev1
- dev1_net
- dev2
- dev2_net.
* Return -> Return:
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-31 13:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 17:48 [B.A.T.M.A.N.] [PATCH 0/4] batman-adv: Add network name space support Andrew Lunn
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves Andrew Lunn
2016-01-23 2:06 ` Antonio Quartulli
2016-01-23 17:20 ` Andrew Lunn
2016-01-24 6:19 ` Antonio Quartulli
2016-01-24 10:42 ` Antonio Quartulli
2016-01-24 16:46 ` Andrew Lunn
2016-01-24 11:01 ` Antonio Quartulli
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: Create batman soft interfaces within correct netns Andrew Lunn
2016-01-25 3:28 ` Antonio Quartulli
2016-01-25 13:12 ` Andrew Lunn
2016-01-26 5:43 ` Antonio Quartulli
2016-01-26 5:55 ` Antonio Quartulli
2016-01-31 13:26 ` Sven Eckelmann
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: Handle parent interfaces in a different netns Andrew Lunn
2016-01-26 12:53 ` Antonio Quartulli
2016-01-26 13:25 ` Sven Eckelmann
2016-01-27 10:13 ` Sven Eckelmann
2016-01-27 10:44 ` Antonio Quartulli
2016-02-01 2:57 ` Antonio Quartulli
2016-02-02 2:11 ` Andrew Lunn
2016-01-31 13:26 ` Sven Eckelmann [this message]
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: debugfs: Add netns support Andrew Lunn
2016-01-28 1:28 ` Antonio Quartulli
2016-01-28 1:40 ` Andrew Lunn
2016-01-28 2:29 ` Antonio Quartulli
2016-01-31 13:26 ` Sven Eckelmann
2016-01-28 2:59 ` [B.A.T.M.A.N.] [PATCH 0/4] batman-adv: Add network name space support Antonio Quartulli
2016-01-28 3:50 ` Andrew Lunn
2016-01-31 13:26 ` Sven Eckelmann
2016-02-12 15:57 ` 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=76541057.mOyc0Z9Mdy@sven-edge \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox