pos = rcu_dereference(pos->next))
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+#define SKB_PORTID(x) NETLINK_CB(x).portid
+#else
+#define SKB_PORTID(x) NETLINK_CB(x).pid
+#endif
+
#define WPROBE_MIN_INTERVAL 100 /* minimum measurement interval in msecs */
#define WPROBE_MAX_FILTER_SIZE 1024
#define WPROBE_MAX_FRAME_SIZE 1900
struct wprobe_value *val = dev->query_val;
u64 time = val[i].last - val[i].first;
- hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
+ hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq,
&wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_INFO);
if (nla_put_u32(msg, WPROBE_ATTR_ID, i))
{
struct genlmsghdr *hdr;
- hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
+ hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq,
&wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_LIST);
if ((i == 0) && (dev->addr != NULL)) {
struct nlattr *group, *item;
int i;
- hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
+ hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq,
&wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_FILTER);
if (!hdr)
return false;
{
struct genlmsghdr *hdr;
- hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
+ hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq,
&wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_LINKS);
if (!hdr)
return false;