Skip to contentSkip to conversation

libxt_length: update to revision 1

PATCH New Changli Gao 1 participant 1 message Jul 24, 2010 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libxt_length: update to revision 1

update libxt_length to revision 1 to support ipv6 jumbo frames.

----

 extensions/libxt_length.c           |    5 +++--
 include/linux/netfilter/xt_length.h |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
extensions/libxt_length.c +3 -2
index 96e8b6c..d46eb50 100644
@@ -21,7 +21,7 @@ static const struct option length_opts[] = {
 	{ .name = NULL }
 };
 
-static u_int16_t
+static u_int32_t
 parse_length(const char *s)
 {
 	unsigned int len;
@@ -47,7 +47,7 @@ parse_lengths(const char *s, struct xt_length_info *info)
 		cp++;
 
 		info->min = buffer[0] ? parse_length(buffer) : 0;
-		info->max = cp[0] ? parse_length(cp) : 0xFFFF;
+		info->max = cp[0] ? parse_length(cp) : 0xFFFFFFFF;
 	}
 	free(buffer);
 	
@@ -125,6 +125,7 @@ static struct xtables_match length_match = {
 	.print		= length_print,
 	.save		= length_save,
 	.extra_opts	= length_opts,
+	.revision	= 1,
 };
 
 void _init(void)
include/linux/netfilter/xt_length.h +1 -1
index b82ed7c..a12785c 100644
@@ -4,7 +4,7 @@
 #include <linux/types.h>
 
 struct xt_length_info {
-    __u16	min, max;
+    __u32	min, max;
     __u8	invert;
 };