Re: [B.A.T.M.A.N.] [PATCH v6 01/11] batman-adv: Handle parent interfaces in a different netns

Sven Eckelmann
2016-05-17T06:33:06Z

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

On Monday 16 May 2016 19:27:59 Andrew Lunn wrote:
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
> +
> +/* WARNING for batadv_getlink_net */
> +#define get_link_net get_xstats_size || 0 || netdev->rtnl_link_ops-
>get_xstats_size
> +
> +#endif /* < KERNEL_VERSION(4, 0, 0) */

This should be "|| 1 ||" to enforce the immediate return in the function
batadv_get_link_net. This was also the version submitted to gather some
comments [1] about the compat-hack.

* v2 had "|| 1 ||": https://patchwork.open-mesh.org/patch/16003/
* v3 had "|| 0 ||": https://patchwork.open-mesh.org/patch/16024/

I think I removed this multiple times but this misalignment seems to be
immortal:

> return (dev1_parent_iflink == dev2->ifindex) &&
> - (dev2_parent_iflink == dev1->ifindex);
> + (dev2_parent_iflink == dev1->ifindex) &&
> + net_eq(dev1_parent_net, net2) &&
> + net_eq(dev2_parent_net, net1);

Kind regards,
Sven

[1] https://patchwork.open-mesh.org/patch/15996/

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