net/can: allow errmask to be set to CAN_ERR_FLAG;

For the LIN protocol, the error frame ID can be 0. This change is to ensure that all LIN error frames can pass the filter.

Signed-off-by: wangjinjing1 <wangjinjing1@xiaomi.com>
This commit is contained in:
wangjinjing1
2025-05-23 10:25:48 +08:00
committed by Xiang Xiao
parent d39ed19213
commit 18820ef07d
+1 -1
View File
@@ -133,7 +133,7 @@ int can_setsockopt(FAR struct socket *psock, int level, int option,
return -EINVAL;
}
conn->err_mask = *(FAR can_err_mask_t *)value & CAN_ERR_MASK;
conn->err_mask = *(FAR can_err_mask_t *)value;
break;
#endif