From 8e35b71052039e84197f0008da780beba9014c7f Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Sat, 30 Mar 2013 15:15:19 +0000 Subject: src: allow to get and to set NFT_*_ATTR_FAMILY This patch adds support to get and set the attribute NFT_{TABLE|CHAIN|RULE}_ATTR_FAMILY. I found this useful when parsing a XML table|chain|rule (future patch). Signed-off-by: Arturo Borrero Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 501b4f6..57b849d 100644 --- a/src/rule.c +++ b/src/rule.c @@ -96,6 +96,9 @@ void nft_rule_attr_set(struct nft_rule *r, uint16_t attr, void *data) case NFT_RULE_ATTR_COMPAT_FLAGS: r->compat.flags = *((uint32_t *)data); break; + case NFT_RULE_ATTR_FAMILY: + r->family = *((uint8_t *)data); + break; default: return; } -- cgit v1.2.3