All of lore.kernel.org
 help / color / mirror / Atom feed
* j1939: bind() and connect()
@ 2017-08-14 17:37 Marc Kleine-Budde
  2017-08-15  8:14 ` Marc Kleine-Budde
  2017-08-16  9:34 ` Kurt Van Dijck
  0 siblings, 2 replies; 14+ messages in thread
From: Marc Kleine-Budde @ 2017-08-14 17:37 UTC (permalink / raw)
  To: Kurt Van Dijck, linux-can; +Cc: David Jander


[-- Attachment #1.1: Type: text/plain, Size: 973 bytes --]

Hello Kurt,

I've a few questions about the j1939 socket model:

- Should bind() be allowed to any interface, i.e. with can_ifindex == 0?

I don't think so, but it's never checked for this.

- Should a connect() without a previous bind() be allowed?

It's not checked for, but the error handling in sk_connect doesn't take
that into account.

- 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.

- Should a second conect() be allowed on a previously connect() socket?

Again some code, but AFAICS no real support.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-08-17  8:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.