From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Osborne, Paul" <Paul.Osborne@digi.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Andri Yngvason <andri.yngvason@marel.com>
Subject: Re: Expose filtered CAN interface to processes
Date: Sat, 30 Jan 2016 11:24:33 +0100 [thread overview]
Message-ID: <56AC8F61.5050404@hartkopp.net> (raw)
In-Reply-To: <EB7F4954055D8D47BE2774BFC0597392301E144B@MTK-SMS-XCH02.digi.com>
Hello Paul,
On 01/29/2016 10:53 PM, Osborne, Paul wrote:
>>> I am new to network namespaces; Am I missing something? Is this a
>>> real use case for network namespace support? It sounded like there
>>> was uncertainty on this point with the RFC that was posted back in
>>> September by Andri: http://comments.gmane.org/gmane.linux.can/8589.
>>
>> Yes. I think this would be the right way to go.
>>
>> My current idea regarding namespace aware virtual CAN interfaces is to create
>> virtual CAN interfaces inside a network namespace. These 'vcan with namespace'
>> interfaces could then be connected via cangw in the initial (real world)
>> namespace to other can/vcan interfaces (with/without namespace) with cangw rules.
>>
>> The good thing about this approach is that you can use the filter and
>> modification capabilities from cangw at the same time.
>
> Alright, good to know I am not barking up the wrong tree. As I am
> needing this functionality in the not-too-distant future, I may take a
> shot at putting something together based on the work Andri has done
> and your comments.
Cool!
> I am also putting together a change to allow for filtering on the data
> of CAN messages (in combination with the can_id/mask). I'm a bit more
> skeptical of that change but may submit an RFC for that as well if the
> changes end up not being too unpalatable.
Oh - I proposed this idea of using the cangw with a namespace aware
configuration as I did not see the standard way creating vcan peers with
ip link add vcan0 type vcan peer name vcan1
ip link set vcan0 netns mynamespace
won't work that way. If you have a 'standard' solution I would be happy to see it.
Using the cangw with filtering would help to have some kind of CAN ID firewall
directly - but this might be done in the global namespace too when connecting
the peered vcan1 to some real can0 ...
You can hopefully follow my thoughts as namespaces are new to me too :-)
Best regards,
Oliver
next prev parent reply other threads:[~2016-01-30 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-29 19:06 Expose filtered CAN interface to processes Osborne, Paul
2016-01-29 20:05 ` Oliver Hartkopp
2016-01-29 21:53 ` Osborne, Paul
2016-01-30 10:24 ` Oliver Hartkopp [this message]
2016-02-01 10:13 ` Andri Yngvason
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=56AC8F61.5050404@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=Paul.Osborne@digi.com \
--cc=andri.yngvason@marel.com \
--cc=linux-can@vger.kernel.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).