hardbyte / hardbyte/python-can

Socketcan uses incorrect flag for direction

Aperta
#1,274 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub
backend:socketcan bug
Lingua principale
Python
Stelle
1.6k
Fork
697
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The socketcan implementation is using `MSG_DONTROUTE` flag instead of `MSG_CONFIRM` flag to set the `is_rx` message field. This breaks applications where virtual can interface is used, because all messages originate from the same host and thus `is_rx` is always false. IMO the correct behavior should be to use `MSG_CONFIRM` flag instead, but this could break some existing applications if they use two instances of the same socket simultaneously. Opinions?

`MSG_DONTROUTE` and `MSG_CONFIRM` docs (section 4.1.7): https://www.kernel.org/doc/Documentation/networking/can.txt

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.