Skip to contentSkip to conversation

set: xml: fix key_type parsing

PATCH Applied Arturo Borrero Gonzalez 2 participants 4 messages Sep 4, 2013 – Sep 5, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 set: xml: fix key_type parsing

Bug introduced by myself at 44928cd5 [set: add XML parsing]

---

 0 files changed
src/set.c +1 -1
index 1168b54..fe30e77 100644
@@ -458,7 +458,7 @@ static int nft_set_xml_parse(struct nft_set *s, const char *xml)
 	s->flags |= (1 << NFT_SET_ATTR_KEY_TYPE);
 
 	if (nft_mxml_num_parse(tree, "key_len", MXML_DESCEND_FIRST,
-			       BASE_DEC, &s->key_type, NFT_TYPE_U32) != 0)
+			       BASE_DEC, &s->key_len, NFT_TYPE_U32) != 0)
 		goto err;
 
 	s->flags |= (1 << NFT_SET_ATTR_KEY_LEN);
maintainer Applied
#1 lore raw
Quoted 1 line · Arturo Borrero Gonzalez

Bug introduced by myself at 44928cd5 [set: add XML parsing]

Applied.

Please, investigate why the json/xml test infrastructure did not catch up this. Thanks.

#2 lore raw
Quoted 7 lines · Pablo Neira Ayuso
Quoted 1 line · Arturo Borrero Gonzalez

Bug introduced by myself at 44928cd5 [set: add XML parsing]

Applied.

Please, investigate why the json/xml test infrastructure did not catch up this. Thanks.

The current testfiles for set uses the same value both in key_type and key_len.

In fact, I discovered this bug using nft-parsing-test, but with others, additional files.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 10 lines · Arturo Borrero Gonzalez
Quoted 7 lines · Pablo Neira Ayuso
Quoted 1 line · Arturo Borrero Gonzalez

Bug introduced by myself at 44928cd5 [set: add XML parsing]

Applied.

Please, investigate why the json/xml test infrastructure did not catch up this. Thanks.

The current testfiles for set uses the same value both in key_type and key_len.

I expected something like this.

Quoted 2 lines

In fact, I discovered this bug using nft-parsing-test, but with others, additional files.

I see, I think that including such a test to master would be good.

Regards.