From: Markus Koetter <koetter@rrzn.uni-hannover.de>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH 2/5] netlink: delinarize chain policy
Date: Wed, 17 Jun 2015 22:07:34 +0200 [thread overview]
Message-ID: <1434571657-20047-3-git-send-email-koetter@rrzn.uni-hannover.de> (raw)
In-Reply-To: <1434571657-20047-1-git-send-email-koetter@rrzn.uni-hannover.de>
---
include/rule.h | 1 +
src/netlink.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/include/rule.h b/include/rule.h
index fbd327b..40cb98a 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -119,6 +119,7 @@ struct chain {
const char *type;
struct scope scope;
struct list_head rules;
+ uint32_t policy;
};
extern const char *chain_type_name_lookup(const char *name);
diff --git a/src/netlink.c b/src/netlink.c
index 84d9d27..17aabd4 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -675,6 +675,10 @@ static struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx,
chain->flags |= CHAIN_F_BASECHAIN;
}
+ if (nft_chain_attr_is_set(nlc, NFT_CHAIN_ATTR_TYPE))
+ chain->policy =
+ nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_POLICY);
+
return chain;
}
--
1.9.1
next prev parent reply other threads:[~2015-06-17 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 20:07 [PATCH 0/5] nft trace Markus Koetter
2015-06-17 20:07 ` [PATCH 1/5] parser: add trace command Markus Koetter
2015-06-17 20:07 ` Markus Koetter [this message]
2015-06-26 8:09 ` [PATCH 2/5] netlink: delinarize chain policy Pablo Neira Ayuso
2015-06-17 20:07 ` [PATCH 3/5] rule: make cache creation a function Markus Koetter
2015-06-17 20:07 ` [PATCH 4/5] trace: implement commands action Markus Koetter
2015-06-25 14:11 ` Pablo Neira Ayuso
2015-06-17 20:07 ` [PATCH 5/5] trace: add log for packets Markus Koetter
2015-06-25 13:38 ` Pablo Neira Ayuso
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=1434571657-20047-3-git-send-email-koetter@rrzn.uni-hannover.de \
--to=koetter@rrzn.uni-hannover.de \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.