Commit Graph

15 Commits (af09afb73435587009aaeba32c19fb7c7e8475f1)

Author SHA1 Message Date
Oliver Hartkopp dfb607c807 remove obsolete char pointer casts
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2022-03-14 18:21:45 +01:00
Oliver Hartkopp f7307b8290 can-utils: check for return values of if_nametoindex()
if_nametoindex() returns zero and a specific errno in the case the network
interface does not exist. The missing check leads to the use of the 'any'
CAN device but leaves the user alone as the user gets no error message.

Reported-by: Lothar Rubusch <lotophagon@protonmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-18 09:37:46 +02:00
Rosen Penev f766174677
custom if statement reordering
It makes more sense to return before hitting else.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:48:38 -07:00
Rosen Penev b153fe3f35
clang-tidy: sort includes alphabetically
Found with llvm-include-order

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:28:58 -07:00
Rosen Penev d7df79e687
convert usleep to nanosleep
usleep is removed in POSIX 2008.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-11 23:35:31 -07:00
Alexander GQ Gerasiov 9240ccfcb7 isotpserver.c: Reformat help/usage output to be compatible with help2man.
Gbp-Pq: Name 0016-isotpserver.c-Reformat-help-usage-output-to-be-compa.patch
2020-04-27 08:20:09 +03:00
Yegor Yefremov 14ccc06eba Fix spelling in various files
codespell parameters:

codespell -q 3 --skip="*.in,*.sh,*.m4,config,configure,autom4te.cache"

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-11 14:21:49 +01:00
Yegor Yefremov 7b7331976a Add SPDX identifiers
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-06-19 12:24:24 +02:00
Sven Schmitt f5fb7317aa treewide: use if_nametoindex to avoid overflows
replaced strcpy(if_name, argv[x]) + ioctl by if_idx = if_nametoindex(argv[x])
to avoid overflows caused by long user input.

Signed-off-by: Sven Schmitt <sven.schmitt@gmx.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-06-30 21:00:04 +02:00
Oliver Hartkopp dabe592f45 isotp[server|tun]: update padding and CAN FD features
Update padding and CAN FD features according to the latest isotpsend and
isotprecv changes.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-11-23 12:15:57 +01:00
Oliver Hartkopp 9c5bfab229 isotp: fix copy paste error for isotp padding config
Thanks for the anonymous hint, Mr X ;-)

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-10-23 19:07:54 +02:00
Oliver Hartkopp 836d3cc012 remove obsolete SVN ID tags
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2012-11-14 20:57:16 +01:00
Oliver Hartkopp 589fa16c27 removed unused variable warnings by removing the variables
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2012-11-14 20:43:55 +01:00
Marc Kleine-Budde 722a09116d treewide: replace berlios contact email by linux-can@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-01-11 12:14:15 +01:00
Oliver Hartkopp b68a79ebde Added tiny ip server to send ISO 15765-2 PDUs via internetsockets to the CAN bus and vice versa. 2010-05-14 12:03:32 +00:00