Commit 47f61de
committed
can: isotp: isotp_bind(): do not validate unused address information
JIRA: https://issues.redhat.com/browse/RHEL-80832
commit b76b163
Author: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Tue May 17 16:56:53 2022 +0200
can: isotp: isotp_bind(): do not validate unused address information
With commit 2aa3988 ("can: isotp: isotp_bind(): return -EINVAL on
incorrect CAN ID formatting") the bind() syscall returns -EINVAL when
the given CAN ID needed to be sanitized. But in the case of an unconfirmed
broadcast mode the rx CAN ID is not needed and may be uninitialized from
the caller - which is ok.
This patch makes sure the result of an inproper CAN ID format is only
provided when the address information is needed.
Link: https://lore.kernel.org/all/20220517145653.2556-1-socketcan@hartkopp.net
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Radu Rendec <rrendec@redhat.com>1 parent 0231811 commit 47f61de
1 file changed
+17
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | | - | |
| 1205 | + | |
| 1206 | + | |
1206 | 1207 | | |
1207 | 1208 | | |
1208 | 1209 | | |
1209 | 1210 | | |
1210 | 1211 | | |
1211 | 1212 | | |
1212 | | - | |
1213 | | - | |
| 1213 | + | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
| 1219 | + | |
| 1220 | + | |
1228 | 1221 | | |
1229 | 1222 | | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1230 | 1235 | | |
1231 | 1236 | | |
1232 | 1237 | | |
| |||
0 commit comments