Netdev List
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Julien Gomes <julien@arista.com>, davem@davemloft.net
Cc: Netdev <netdev@vger.kernel.org>,
	Donald Sharp <sharpd@cumulusnetworks.com>
Subject: Re: [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports
Date: Thu, 15 Jun 2017 14:44:40 +0300	[thread overview]
Message-ID: <01588135-b3d6-bc92-be31-0ae86310d904@cumulusnetworks.com> (raw)
In-Reply-To: <2d412677-d31a-7740-952c-b1b007bbf075@cumulusnetworks.com>

On 15/06/17 14:33, Nikolay Aleksandrov wrote:
> On 15/06/17 00:51, Julien Gomes wrote:
>> Hi Nikolay,
>>
>> On 06/14/2017 05:04 AM, Nikolay Aleksandrov wrote:
>>
>>> This has been on our todo list and I'm definitely interested in the implementation.
>>> A few things that need careful consideration from my POV. First are the security
>>> implications - this sends rtnl multicast messages but the rtnl socket has
>>> the NL_CFG_F_NONROOT_RECV flag thus allowing any user on the system to listen in.
>>> This would allow them to see the full packets and all reports (granted they can see
>>> the notifications even now), but the full packet is like giving them the opportunity
>>> to tcpdump the PIM traffic.
>>
>> I definitely see how this can be an issue.
>> From what I see, this means that either the packet should be
>> transmitted another way, or another Netlink family should be used.
>>
>> NETLINK_ROUTE looks to be the logical family to choose though,
>> but then I do not see a proper other way to handle this.
> 
> Right, currently me neither, unless it provides a bind callback when registering
> the kernel socket.
> 
>>
>> However I may just not be looking into the right direction,
>> maybe you currently have another approach in mind?
> 
> I haven't gotten around to make (or even try) them but I was thinking about 2 options
> ending up with a similar result:
> 
> 1) genetlink
>  It also has the NONROOT_RECV flag, but it also allows for a callback - mcast_bind()
>  which can be used to filter.
> 
> or
> 
> 2) Providing a bind callback to the NETLINK_ROUTE socket.
> 

Ah nevermind, these cannot be used for filtering currently, so it seems
the netlink interface would need to be extended too if going down this road.

> I haven't checked in detail how feasible each option is. To me 2) seems like the
> cleaner/proper way to do it but it requires extending the rtnetlink api.
> 
> It would be nice to get feedback and comments from more people on this.
> 
>>
>>> My second (more fixable and minor) concern is about the packet itself, how do you
>>> know that the packet is all linear so you can directly copy it ?
>>
>> Indeed, I overlooked this possibility in this version.
>> I will improve that.
>>
> 
> Thanks!
> 

  reply	other threads:[~2017-06-15 11:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 17:08 [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on cache reports Julien Gomes
2017-06-13 17:08 ` [PATCH net-next 1/3] rtnetlink: add NEWCACHEREPORT message type Julien Gomes
2017-06-13 17:08 ` [PATCH net-next 2/3] ipmr: add netlink notifications on igmpmsg cache reports Julien Gomes
2017-06-14  7:56   ` Nicolas Dichtel
2017-06-14 21:08     ` Julien Gomes
2017-06-13 17:08 ` [PATCH net-next 3/3] ip6mr: add netlink notifications on mrt6msg " Julien Gomes
2017-06-14 12:04 ` [PATCH net-next 0/3] ipmr/ip6mr: add Netlink notifications on " Nikolay Aleksandrov
2017-06-14 21:51   ` Julien Gomes
2017-06-15 11:33     ` Nikolay Aleksandrov
2017-06-15 11:44       ` Nikolay Aleksandrov [this message]
2017-06-15 13:00         ` Nikolay Aleksandrov
2017-06-16 19:26           ` Julien Gomes
2017-06-17 13:35             ` Nikolay Aleksandrov

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=01588135-b3d6-bc92-be31-0ae86310d904@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=julien@arista.com \
    --cc=netdev@vger.kernel.org \
    --cc=sharpd@cumulusnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox