From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Hartkopp Subject: Re: can-j1939 API Date: Thu, 29 Oct 2015 20:33:38 +0100 Message-ID: <56327492.9030405@hartkopp.net> References: <560ADC91.1090408@pengutronix.de> <20150929194920.GA11430@airbook.vandijck-laurijssen.be> <20151018023225.GA29078@airbook.vandijck-laurijssen.be> <20151019204442.GA16852@airbook.vandijck-laurijssen.be> <20151023111430.GB22388@airbook.eia.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]:39102 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757544AbbJ2Tdt (ORCPT ); Thu, 29 Oct 2015 15:33:49 -0400 In-Reply-To: <20151023111430.GB22388@airbook.eia.lan> Sender: linux-can-owner@vger.kernel.org List-ID: To: Alex Layton , Kurt Van Dijck Cc: linux-can Hi Kurt, On 10/23/2015 01:14 PM, Kurt Van Dijck wrote: >>>> ... >>>> Can you not have you module only listen on >>>> interfaces where J1939 sockets have been opened? >>> >>> That sounds like a fine idea! >>> It would behave slightly different during booting, but given the critics >>> on the switch, this will probably the best thing to do. >>> This implies that a non-root user decides to turn on can-j1939 >>> processing on an interface, which I found a hard nut to crack. >> >> I had not really considered the user permissions ramifications of >> things. You raise a good point here. >> >> Doesn't SocketCAN automatically load the protocol module when you try >> to open a socket? That means non-root users can already decide to turn >> on processing on an interface for ISOTP etc. I am good with non-root >> users being able to enable J1939 like this, especially if the >> precedent is already set by other protocols. > > Yep, I can follow that argument. > When I get to it, I'll change that. > It also implies I can drop iproute2-j1939 branches completely. > Just to be sure I understood it correctly: No iproute2-j1939 branch -> no address support for j1939 in iproute -> no address support in af_can.c ?? \o/ So you would automatically take care of SA/Name when a j1939 socket is created with the according address information (== per-socket), right? Regards, Oliver