hardbyte / hardbyte/python-can

Socketcan uses incorrect flag for direction

Ouverte
#1,274 13 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
backend:socketcan bug
Langage dominant
Python
Étoiles
1.6k
Forks
697
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.