From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <cwang@twopensource.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>,
Cong Wang <xiyou.wangcong@gmail.com>,
netdev <netdev@vger.kernel.org>,
Patrick McHardy <kaber@trash.net>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Patch net] macvlan: add NETIF_F_NETNS_LOCAL flag
Date: Mon, 10 Feb 2014 21:38:19 -0800 [thread overview]
Message-ID: <1392097099.6615.74.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1392097032.6615.73.camel@edumazet-glaptop2.roam.corp.google.com>
On Mon, 2014-02-10 at 21:37 -0800, Eric Dumazet wrote:
>
> Simple patch would be :
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 048dc8d183aa..31bbba34fd1e 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -963,6 +963,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
> nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) ||
> #endif
> (dev->ifindex != dev->iflink &&
> + __dev_get_by_index(dev_net(dev), dev->iflink) &&
> nla_put_u32(skb, IFLA_LINK, dev->iflink)) ||
> (upper_dev &&
> nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) ||
>
Hmm, not enough.
We probably need to keep a pointer to iflink net structure.
next prev parent reply other threads:[~2014-02-11 5:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 1:36 [Patch net] macvlan: add NETIF_F_NETNS_LOCAL flag Cong Wang
2014-02-11 1:45 ` Hannes Frederic Sowa
2014-02-11 2:25 ` Cong Wang
2014-02-11 2:40 ` Hannes Frederic Sowa
2014-02-11 4:15 ` Eric Dumazet
2014-02-11 4:41 ` Cong Wang
2014-02-11 5:21 ` Eric Dumazet
2014-02-11 5:37 ` Eric Dumazet
2014-02-11 5:38 ` Eric Dumazet [this message]
2014-02-12 10:03 ` Nicolas Dichtel
2014-02-12 9:47 ` Nicolas Dichtel
2014-02-11 4:14 ` Eric Dumazet
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=1392097099.6615.74.camel@edumazet-glaptop2.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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.