summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-08-18 01:07:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-08-18 01:10:04 +0200
commit94002b41384890224bfb14d1b0986bd8b279b17e (patch)
tree98183db74a84036831c6c626df993eaa48e5025c /src/netlink.c
parentecf855b2f58f1718a6a1c3dcde13b140557844ec (diff)
parent6c43069e5f2a55d769ec6d362bc863af906591d0 (diff)
Merge branch 'next-4.2'
This branch adds support for the new 'netdev' family. This also resolves a simple conflict with the default chain policy printing. Conflicts: src/rule.c Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 8ede8e69..cff93446 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -555,6 +555,9 @@ static int netlink_add_chain_batch(struct netlink_ctx *ctx,
if (chain->policy != -1)
nft_chain_attr_set_u32(nlc, NFT_CHAIN_ATTR_POLICY,
chain->policy);
+ if (chain->dev != NULL)
+ nft_chain_attr_set_str(nlc, NFT_CHAIN_ATTR_DEV,
+ chain->dev);
}
netlink_dump_chain(nlc);
@@ -699,6 +702,10 @@ static struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx,
xstrdup(nft_chain_attr_get_str(nlc, NFT_CHAIN_ATTR_TYPE));
chain->policy =
nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_POLICY);
+ if (nft_chain_attr_is_set(nlc, NFT_CHAIN_ATTR_DEV)) {
+ chain->dev =
+ xstrdup(nft_chain_attr_get_str(nlc, NFT_CHAIN_ATTR_DEV));
+ }
chain->flags |= CHAIN_F_BASECHAIN;
}