Repository : ssh://git@diktynna/batman-adv
On branch : master
commit d20b3e396ec1f838e7e51f2de2329f43d4b92271 Author: Sven Eckelmann sven@narfation.org Date: Sat Aug 20 13:27:36 2022 +0200
batman-adv: compat: Add support for ETH_MIN_MTU
Fixes: a124b52ebab9 ("batman-adv: Fix hang up with small MTU hard-interface") Signed-off-by: Sven Eckelmann sven@narfation.org
d20b3e396ec1f838e7e51f2de2329f43d4b92271 compat-include/uapi/linux/if_ether.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/compat-include/uapi/linux/if_ether.h b/compat-include/uapi/linux/if_ether.h new file mode 100644 index 00000000..a23fa4d8 --- /dev/null +++ b/compat-include/uapi/linux/if_ether.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) B.A.T.M.A.N. contributors: + * + * Marek Lindner, Simon Wunderlich + * + * This file contains macros for maintaining compatibility with older versions + * of the Linux kernel. + */ + +#ifndef _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_ +#define _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_ + +#include <linux/version.h> +#include_next <uapi/linux/if_ether.h> + + +#if LINUX_VERSION_IS_LESS(4, 10, 0) + +#ifndef ETH_MIN_MTU +#define ETH_MIN_MTU 68 +#endif + +#endif /* LINUX_VERSION_IS_LESS(4, 10, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_ */