Re: [B.A.T.M.A.N.] [RFC v2 0/5] batman-adv netlink query API

Sven Eckelmann
2016-04-18T10:59:19Z

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

On Friday 18 March 2016 12:53:37 Matthias Schiffer wrote:
[...]
> Thanks for the build testing, I haven't put too much thought into the
> compat issues yet. The genl_register_family_with_ops error should be easy
> to fix, the struct netlink_skb_parms differences might be more problematic.

The genl_register_family_with_ops error can most likely be solved by

https://git.kernel.org/cgit/linux/kernel/git/backports/backports.git/tree/backport/backport-include/net/genetlink.h?id=a91a3e6e3a6ed6cdbbe942bafe05ae5fcdf41ce9

The netlink_skb_parms most likely can be fixed by redefining NETLINK_CB to
something which casts to a structure with the name portid for the field
pid for Linux < 3.7.

struct netlink_skb_parms_compat {
struct scm_creds creds;
__u32 portid; /* was renamed in 3.7 from "pid" */
__u32 dst_group;
__u32 flags;
struct sock *sk;
};

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]