summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-08-21 13:55:21 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-08-21 13:55:42 +0200
commit57113e21a4eb4a1b53c0c1a13671ea152c4186ac (patch)
tree4a99c9c8ca70c8847496bb09c48c2e8e827cfe80
parent89de65dc184e7b7ed5bfededd647e190c3bf310a (diff)
expect: fix compilation warning in nfexp_nlmsg_build
build_mnl.c: In function 'nfexp_nlmsg_build': build_mnl.c:18:11: warning: variable 'l3num' set but not used [-Wunused-but-set-variable] This patch relaxes the checking for the L3PROTO. The kernel will report EINVAL in case that something is missing. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/expect/build_mnl.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/expect/build_mnl.c b/src/expect/build_mnl.c
index 6f33f05..2db6d07 100644
--- a/src/expect/build_mnl.c
+++ b/src/expect/build_mnl.c
@@ -15,15 +15,6 @@
int
nfexp_nlmsg_build(struct nlmsghdr *nlh, const struct nf_expect *exp)
{
- u_int8_t l3num;
-
- if (test_bit(ATTR_ORIG_L3PROTO, exp->master.set))
- l3num = exp->master.orig.l3protonum;
- else if (test_bit(ATTR_ORIG_L3PROTO, exp->expected.set))
- l3num = exp->expected.orig.l3protonum;
- else
- return -1;
-
if (test_bit(ATTR_EXP_EXPECTED, exp->set))
nfct_build_tuple(nlh, &exp->expected.orig, CTA_EXPECT_TUPLE);