If j1939spy is started with the verbose option "-v" or "--verbose", it
will print the error "j1939spy: listening: Success" and exit. Remove
this option altogether.
Fixes: c50b5a39de ("can-j1939: add jspy 'sniffer' program")
We don't need to block any signals, so a select() is sufficient. This
also fixes the problem that sigmask is uninitialized and may block the
sig ARLM, which make canbusload hang until a CAN frame is recieved.
Closes: https://github.com/linux-can/can-utils/issues/465
If CAN_ERR_CNT is set, the snprintf_can_error_frame() bails out, as it
cannot decode CAN_ERR_CNT.
Fixes: 21fb43532e ("lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set")
In 913311fc15 ("can-calc-bit-timing: add support to decode user
supplied bit timing parameters") support to decide user supplied bit
timing parameters was added. However, it was forgotten to add --tq to
the help text.
Add help text for the --tq paramter.
Reported-by: https://github.com/EnricoMontecaggi
Closes: https://github.com/linux-can/can-utils/issues/459
Fixes: 913311fc15 ("can-calc-bit-timing: add support to decode user supplied bit timing parameters")
Commit 0be066bee6 ("cansequence: main(): allow to bind on "any"
interface") converted from SIOCGIFINDEX ioctl() to if_nametoindex()
and adjusted the error message, but forgot the "()" after the function
name, which is used in the rest of the error messages in this file.
Add the missing "()".
Fixes: 0be066bee6 ("cansequence: main(): allow to bind on "any" interface")
In commit 9567230494 ("cansequence: print out dropped packages by
socket counter"), the read() syscall was replaced by recvmsg(). Adjust
error message accordingly.
Fixes: 9567230494 ("cansequence: print out dropped packages by socket counter")
It is not implemented and not supported by any of the can-utils, so
remove it.
Reported-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
"errno" hold the positive error value.
Link: https://github.com/linux-can/can-utils/issues/448
Fixes: cc155d2f63 ("j1939cat: make use of new RX UAPI")
Fixes: 19d41bec45 ("jcat: allow to re-send rest of the buffer if we was interrupted")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
The check has only been applied after the first CAN frame has been read
and evaluated. This lead to an unintended sending of a single handcrafted
frame with a following (intended) failure at the second frame.
Apply the check also for the very first CAN frame that is processed.
Fixes: ee0233505b ("canplayer: ensure 6 decimal places in timestamp")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
By using C99 initializers for struct sockaddr_can addr the not
assigned members are automatically set to 0x0, resulting in not
passing uninitialized memory to the bind() syscall.
Also remove the printing of the socket family, type and proto, this
was interesting back in the days, when the numbers were not fixed, yet.