Re: [B.A.T.M.A.N.] [PATCHv12 2/4] batman-adv: Add multicast optimization support for bridged setups

Sven Eckelmann
2016-04-07T13:50:39Z

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

On Wednesday 16 March 2016 05:06:43 Linus Lüssing wrote:
> --- /dev/null
> +++ b/compat-sources/net/bridge/br_multicast.c
> @@ -0,0 +1,33 @@
> +#include <linux/if_bridge.h>
> +#include <linux/printk.h>
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) || \
> + LINUX_VERSION_CODE == KERNEL_VERSION(3, 16, 0) && \
> + (!IS_ENABLED(CONFIG_BRIDGE) || \
> + !IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING))
> +
> +int br_multicast_list_adjacent(struct net_device *dev,
> + struct list_head *br_ip_list)
> +{
> + return 0;
> +}
> +
> +bool br_multicast_has_querier_adjacent(struct net_device *dev, int proto)
> +{
> + return false;
> +}
> +
> +#endif /* < KERNEL_VERSION(3, 16, 0) ||
> + * !IS_ENABLED(CONFIG_BRIDGE) ||
> + * !IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING) */
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
> +
> +bool br_multicast_has_querier_anywhere(struct net_device *dev, int proto)
> +{
> + pr_warn_once("Old kernel detected (< 3.17) - multicast optimizations disabled\n");
> +
> + return false;
> +}
> +
> +#endif /* < KERNEL_VERSION(3, 17, 0) */

Why must there be a special compat-sources/*.c file for these tiny
functions?

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]