[LTP] [PATCH 1/2] add ETH_P_CAN compat macro to LAPI headers
Petr Vorel
pvorel@suse.cz
Fri Feb 6 15:34:08 CET 2026
Hi Vasileios,
> include/lapi/if_ether.h | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/include/lapi/if_ether.h b/include/lapi/if_ether.h
> index 536d1863a..423341c57 100644
> --- a/include/lapi/if_ether.h
> +++ b/include/lapi/if_ether.h
> @@ -16,4 +16,8 @@
> # define ETH_P_ALL 0x0003
> #endif
> +#ifndef ETH_P_CAN
> +# define ETH_P_CAN 0x000C
> +#endif
This is not needed, because it was added to kernel's
include/uapi/linux/if_ether.h before UAPI creation in v3.7-rc1.
And we now expect kernel >= 4.4 [1].
FYI the fallback was originally added in 2017 in
db141701dd ("Add test for CVE-2017-7308 on a raw socket's ring buffer"),
the supported systems required it back then, but now whole include/lapi/if_ether.h,
could be deleted (as an separate effort). For now it'd be enough just to ignore
this commit (not add it).
Kind regards,
Petr
[1] https://linux-test-project.readthedocs.io/en/latest/users/supported_systems.html
More information about the ltp
mailing list