From: kernel test robot <lkp@intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [netfilter-nf-next:testing 6/11] net/netfilter/nf_nat_proto.c:721:25: warning: unused variable 'skb'
Date: Fri, 27 May 2022 15:03:52 +0800 [thread overview]
Message-ID: <202205271540.880v8PNJ-lkp@intel.com> (raw)
tree: git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git testing
head: 1baa240a3c6507449f4a3cd150dddacf69d95fb5
commit: 93d6b481397f4c62da1568b463a4d4b254578c37 [6/11] netfilter: make hook functions accept only one argument
config: i386-randconfig-a014-20211029 (https://download.01.org/0day-ci/archive/20220527/202205271540.880v8PNJ-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git/commit/?id=93d6b481397f4c62da1568b463a4d4b254578c37
git remote add netfilter-nf-next git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git
git fetch --no-tags netfilter-nf-next testing
git checkout 93d6b481397f4c62da1568b463a4d4b254578c37
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/netfilter/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
net/netfilter/nf_nat_proto.c: In function 'nf_nat_ipv4_out':
>> net/netfilter/nf_nat_proto.c:721:25: warning: unused variable 'skb' [-Wunused-variable]
721 | struct sk_buff *skb = state->skb;
| ^~~
net/netfilter/nf_nat_proto.c: In function 'nf_nat_ipv6_out':
net/netfilter/nf_nat_proto.c:960:25: warning: unused variable 'skb' [-Wunused-variable]
960 | struct sk_buff *skb = state->skb;
| ^~~
vim +/skb +721 net/netfilter/nf_nat_proto.c
717
718 static unsigned int
719 nf_nat_ipv4_out(const struct nf_hook_state *state)
720 {
> 721 struct sk_buff *skb = state->skb;
722 #ifdef CONFIG_XFRM
723 const struct nf_conn *ct;
724 enum ip_conntrack_info ctinfo;
725 int err;
726 #endif
727 unsigned int ret;
728
729 ret = nf_nat_ipv4_fn(state);
730 #ifdef CONFIG_XFRM
731 if (ret != NF_ACCEPT)
732 return ret;
733
734 if (IPCB(skb)->flags & IPSKB_XFRM_TRANSFORMED)
735 return ret;
736
737 ct = nf_ct_get(skb, &ctinfo);
738 if (ct) {
739 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
740
741 if (ct->tuplehash[dir].tuple.src.u3.ip !=
742 ct->tuplehash[!dir].tuple.dst.u3.ip ||
743 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMP &&
744 ct->tuplehash[dir].tuple.src.u.all !=
745 ct->tuplehash[!dir].tuple.dst.u.all)) {
746 err = nf_xfrm_me_harder(state->net, skb, AF_INET);
747 if (err < 0)
748 ret = NF_DROP_ERR(err);
749 }
750 }
751 #endif
752 return ret;
753 }
754
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-05-27 7:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202205271540.880v8PNJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=fw@strlen.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox