Skip to contentSkip to conversation

datatype: fix name of icmp* code

PATCH In review Eric Leblond 3 participants 3 messages Dec 2, 2014 – Dec 3, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 datatype: fix name of icmp* code

The name of datatypes can be used in set definition so they should follow the same logic (and maybe not contain space to avoid problem with parsing).

This patch adds an underscore to the name of the icmp* code datatype.

---
 src/datatype.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/datatype.c +3 -3
index 5f976aa..1948bfa 100644
@@ -717,7 +717,7 @@ static struct error_record *icmp_code_type_parse(const struct expr *sym,
 
 const struct datatype icmp_code_type = {
 	.type		= TYPE_ICMP_CODE,
-	.name		= "icmp code",
+	.name		= "icmp_code",
 	.desc		= "icmp code",
 	.size		= BITS_PER_BYTE,
 	.byteorder	= BYTEORDER_BIG_ENDIAN,
@@ -749,7 +749,7 @@ static struct error_record *icmpv6_code_type_parse(const struct expr *sym,
 
 const struct datatype icmpv6_code_type = {
 	.type		= TYPE_ICMPV6_CODE,
-	.name		= "icmpv6 code",
+	.name		= "icmpv6_code",
 	.desc		= "icmpv6 code",
 	.size		= BITS_PER_BYTE,
 	.byteorder	= BYTEORDER_BIG_ENDIAN,
@@ -781,7 +781,7 @@ static struct error_record *icmpx_code_type_parse(const struct expr *sym,
 
 const struct datatype icmpx_code_type = {
 	.type		= TYPE_ICMPX_CODE,
-	.name		= "icmpx code",
+	.name		= "icmpx_code",
 	.desc		= "icmpx code",
 	.size		= BITS_PER_BYTE,
 	.byteorder	= BYTEORDER_BIG_ENDIAN,
Signature · 1 line
2.1.3
#1 lore raw

Hi Eric

Quoted 8 lines · Eric Leblond

The name of datatypes can be used in set definition so they should follow the same logic (and maybe not contain space to avoid problem with parsing).

This patch adds an underscore to the name of the icmp* code datatype.

Looks good to me. Thanks, I have used a uncorrect name format :)

Quoted 28 lines
---
  src/datatype.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
src/datatype.c +2 -2
index 5f976aa..1948bfa 100644
@@ -717,7 +717,7 @@ static struct error_record *icmp_code_type_parse(const struct expr *sym,
 
  const struct datatype icmp_code_type = {
  	.type		= TYPE_ICMP_CODE,
-	.name		= "icmp code",
+	.name		= "icmp_code",
  	.desc		= "icmp code",
  	.size		= BITS_PER_BYTE,
  	.byteorder	= BYTEORDER_BIG_ENDIAN,
@@ -749,7 +749,7 @@ static struct error_record *icmpv6_code_type_parse(const struct expr *sym,
 
  const struct datatype icmpv6_code_type = {
  	.type		= TYPE_ICMPV6_CODE,
-	.name		= "icmpv6 code",
+	.name		= "icmpv6_code",
  	.desc		= "icmpv6 code",
  	.size		= BITS_PER_BYTE,
  	.byteorder	= BYTEORDER_BIG_ENDIAN,

src/datatype.c static struct error_record *icmpx_code_type_parse(const struct expr *sym, · line 787

Quoted 8 lines
src/datatype.c +1 -1
@@ -781,7 +781,7 @@ static struct error_record *icmpx_code_type_parse(const struct expr *sym,
 
  const struct datatype icmpx_code_type = {
  	.type		= TYPE_ICMPX_CODE,
-	.name		= "icmpx code",
+	.name		= "icmpx_code",
  	.desc		= "icmpx code",
  	.size		= BITS_PER_BYTE,
  	.byteorder	= BYTEORDER_BIG_ENDIAN,

--
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

#2 lore raw
Quoted 7 lines · Álvaro Neira Ayuso

Hi Eric

Quoted 4 lines · Eric Leblond

The name of datatypes can be used in set definition so they should follow the same logic (and maybe not contain space to avoid problem with parsing).

Quoted 6 lines
Quoted 4 lines

This patch adds an underscore to the name of the icmp* code datatype.

Looks good to me. Thanks, I have used a uncorrect name format :)

Applied, thanks for reviewing.
--
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