]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
chain: xml: delete <use> node
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Mon, 12 Aug 2013 07:35:34 +0000 (09:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Aug 2013 09:32:28 +0000 (11:32 +0200)
Since the 'use' attribute in a chain can't be set, ignore it in the
XML printing.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/chain.c
tests/xmlfiles/10-chain.xml
tests/xmlfiles/11-chain.xml
tests/xmlfiles/12-chain.xml

index a6d99ca078bcb7136b91f870f38935100e45c985..e2296d3cde67430012b48e6106268903e56eb1fe 100644 (file)
@@ -756,11 +756,11 @@ static int nft_chain_snprintf_xml(char *buf, size_t size, struct nft_chain *c)
        ret = snprintf(buf, size, "<chain><name>%s</name>"
                       "<handle>%"PRIu64"</handle><bytes>%"PRIu64"</bytes>"
                       "<packets>%"PRIu64"</packets><type>%s</type>"
-                      "<table>%s</table><prio>%d</prio><use>%d</use>"
+                      "<table>%s</table><prio>%d</prio>"
                       "<hooknum>%s</hooknum>",
                       c->name, c->handle, c->bytes, c->packets,
                       c->type, c->table,
-                      c->prio, c->use, hooknum2str_array[c->hooknum]);
+                      c->prio, hooknum2str_array[c->hooknum]);
        SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
        /* The parsing will fail both if there are something different
index 347626c7c74f8060ce6269cd8c3e3deceede0a93..e22178a1832da1704444a8d204656054d6eaa1d6 100644 (file)
@@ -1 +1 @@
-<chain><name>test</name><handle>0</handle><bytes>0</bytes><packets>0</packets><type>filter</type><table>filter</table><prio>0</prio><use>1</use><hooknum>NF_INET_LOCAL_IN</hooknum><policy>accept</policy><family>ip</family></chain>
+<chain><name>test</name><handle>0</handle><bytes>0</bytes><packets>0</packets><type>filter</type><table>filter</table><prio>0</prio><hooknum>NF_INET_LOCAL_IN</hooknum><policy>accept</policy><family>ip</family></chain>
index beec5ee1026cf126e7c63d329b2469bd182b34a1..41cac4e78e5dc0f735c84743abc56d8eb23ac8ba 100644 (file)
@@ -1 +1 @@
-<chain><name>test</name><handle>0</handle><bytes>59</bytes><packets>1</packets><type>filter</type><table>filter</table><prio>0</prio><use>1</use><hooknum>NF_INET_FORWARD</hooknum><policy>drop</policy><family>ip6</family></chain>
+<chain><name>test</name><handle>0</handle><bytes>59</bytes><packets>1</packets><type>filter</type><table>filter</table><prio>0</prio><hooknum>NF_INET_FORWARD</hooknum><policy>drop</policy><family>ip6</family></chain>
index 9036fa10a83dd6927330e923ca5dd7c21ee440f3..040eca406d8aef46d0924a03ead4605cf5ac77e6 100644 (file)
@@ -1 +1 @@
-<chain><name>foo</name><handle>100</handle><bytes>59264154979</bytes><packets>2548796325</packets><type>nat</type><table>nat</table><prio>0</prio><use>1</use><hooknum>NF_INET_POST_ROUTING</hooknum><policy>accept</policy><family>ip</family></chain>
+<chain><name>foo</name><handle>100</handle><bytes>59264154979</bytes><packets>2548796325</packets><type>nat</type><table>nat</table><prio>0</prio><hooknum>NF_INET_POST_ROUTING</hooknum><policy>accept</policy><family>ip</family></chain>