Re: [PATCH RFC 2/7] netfilter: nft_meta: look at pkt->sk rather than skb->sk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: m68k-sun3_defconfig (attached as .config)
reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout bcddf1d1557b51bef5ef395b5b7dd7b512794e2f
  # save the attached .config to linux build tree
  make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   net/netfilter/nft_meta.c: In function 'nft_meta_get_eval':
>> net/netfilter/nft_meta.c:34:15: warning: unused variable 'sk' [-Wunused-variable]
     struct sock *sk = pkt->sk;
                  ^

vim +/sk +34 net/netfilter/nft_meta.c

    18	#include <linux/ip.h>
    19	#include <linux/ipv6.h>
    20	#include <linux/smp.h>
    21	#include <net/dst.h>
    22	#include <net/sock.h>
    23	#include <net/tcp_states.h> /* for TCP_TIME_WAIT */
    24	#include <net/netfilter/nf_tables.h>
    25	#include <net/netfilter/nft_meta.h>
    26	
    27	void nft_meta_get_eval(const struct nft_expr *expr,
    28			       struct nft_regs *regs,
    29			       const struct nft_pktinfo *pkt)
    30	{
    31		const struct nft_meta *priv = nft_expr_priv(expr);
    32		const struct net_device *in = pkt->in, *out = pkt->out;
    33		struct sk_buff *skb = pkt->skb;
  > 34		struct sock *sk = pkt->sk;
    35		u32 *dest = &regs->data[priv->dreg];
    36	
    37		switch (priv->key) {
    38		case NFT_META_LEN:
    39			*dest = skb->len;
    40			break;
    41		case NFT_META_PROTOCOL:
    42			*dest = 0;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux