On 12/17/20 5:33 PM, Phillip Schichtel wrote: > I also adjusted my java binding to handle the ERANGE error and > everything works as expected with your patch applied. I'm using a > buffer of 10 * sizeof(struct can_filter) now and realloc in case of > ERANGE using the optlen. So with an unpatched kernel the API is > currently restricted to the first 10 filters, but that's probably fine. BTW: The current kernel has an arbitrary limit of 512 filters per socket: #define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */ regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: OpenPGP digital signature