From: David Jander <david@protonic.nl>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>,
linux-can <linux-can@vger.kernel.org>
Subject: Re: j1939: bind() and connect()
Date: Tue, 15 Aug 2017 11:01:16 +0200 [thread overview]
Message-ID: <20170815110116.4d12f4f3@erd980> (raw)
In-Reply-To: <e2a14f73-9456-18c1-7e83-70d43e30cdf0@pengutronix.de>
On Tue, 15 Aug 2017 10:14:18 +0200
Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> On 08/14/2017 07:37 PM, Marc Kleine-Budde wrote:
> > - Should a second bind() be allowed on a previously bind() socket?
> >
> > As far as I understand the code, there's some support, but when the
> > interface is switched, j1939_ifindex_stop() is not called.
>
> Ah, there's a check, that you cannot re-bind() to another interface:
>
> > if (bound_dev_if != addr->can_ifindex)
This makes sense. re-bind() to another interface only would make sense if
bind() to any interface is also permitted, but that would imply separate
address-claims on all different interfaces with potentially different
source-address being claimed on each one.... don't think the stack should take
care of such complex scenarios, at least not at first IMHO.
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2017-08-15 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 17:37 j1939: bind() and connect() Marc Kleine-Budde
2017-08-15 8:14 ` Marc Kleine-Budde
2017-08-15 9:01 ` David Jander [this message]
2017-08-15 9:16 ` Marc Kleine-Budde
2017-08-15 10:24 ` David Jander
2017-08-16 21:08 ` Kurt Van Dijck
2017-08-17 7:35 ` Marc Kleine-Budde
2017-08-17 8:28 ` Kurt Van Dijck
2017-08-17 8:32 ` Marc Kleine-Budde
2017-08-16 9:34 ` Kurt Van Dijck
2017-08-16 10:06 ` Marc Kleine-Budde
2017-08-16 10:29 ` David Jander
2017-08-16 21:18 ` Kurt Van Dijck
2017-08-16 10:47 ` Marc Kleine-Budde
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=20170815110116.4d12f4f3@erd980 \
--to=david@protonic.nl \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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.