Changeset 35185


Ignore:
Timestamp:
2013-01-16T15:05:21+01:00 (5 years ago)
Author:
jow
Message:

wprobe: fix build against Linux 3.7

Location:
packages/net/wprobe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/wprobe/Makefile

    r32066 r35185  
    11# 
    2 # Copyright (C) 2008-2010 OpenWrt.org 
     2# Copyright (C) 2008-2013 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=wprobe 
    1111PKG_VERSION:=1 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_BUILD_DEPENDS:=PACKAGE_wprobe-export:libipfix 
  • packages/net/wprobe/src/kernel/wprobe-core.c

    r34319 r35185  
    3939prefetch(pos->next), pos != (head); \ 
    4040pos = rcu_dereference(pos->next)) 
     41#endif 
     42 
     43#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) 
     44#define SKB_PORTID(x) NETLINK_CB(x).portid 
     45#else 
     46#define SKB_PORTID(x) NETLINK_CB(x).pid 
    4147#endif 
    4248 
     
    442448        u64 time = val[i].last - val[i].first; 
    443449 
    444         hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 
     450        hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq, 
    445451                        &wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_INFO); 
    446452 
     
    515521        struct genlmsghdr *hdr; 
    516522 
    517         hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 
     523        hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq, 
    518524                        &wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_LIST); 
    519525 
     
    558564        int i; 
    559565 
    560         hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 
     566        hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq, 
    561567                        &wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_FILTER); 
    562568        if (!hdr) 
     
    640646        struct genlmsghdr *hdr; 
    641647 
    642         hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 
     648        hdr = genlmsg_put(msg, SKB_PORTID(cb->skb), cb->nlh->nlmsg_seq, 
    643649                        &wprobe_fam, NLM_F_MULTI, WPROBE_CMD_GET_LINKS); 
    644650        if (!hdr) 
Note: See TracChangeset for help on using the changeset viewer.