diff -Naur arptables_jf-0.0.8.orig/arptables.c arptables_jf-0.0.8.new/arptables.c
--- arptables_jf-0.0.8/arptables.c.byteorder 2009-12-04 13:40:59.000000000 +0100
+++ arptables_jf-0.0.8/arptables.c 2009-12-04 14:14:30.000000000 +0100
@@ -740,7 +740,7 @@
for ( i = 0; table[i].name; i++ ) {
if ( ! strcasecmp ( name, table[i].name ) ) {
- *value = table[i].value;
+ *value = htons(table[i].value);
*mask = 0xFFFF;
return;
}
@@ -748,7 +748,7 @@
if ( strlen ( name ) == 4 ) {
for ( i = 0; table[i].name; i++ ) {
if ( ! strncasecmp ( name, table[i].name, 4 ) ) {
- *value = table[i].value;
+ *value = htons(table[i].value);
*mask = 0xFFFF;
return;
}
@@ -770,23 +770,21 @@
if ( isxdigit(ch3) ) {
if ( isxdigit(ch4) ) {
v = (digit_to_bits(ch1)<<12) | (digit_to_bits(ch2)<<8) | ( digit_to_bits(ch3)<<4) | digit_to_bits(ch4);
- p = &name[4];
+ p += 4;
} else {
v = (digit_to_bits(ch1)<<8) | (digit_to_bits(ch2)<<4) | ( digit_to_bits(ch3)<<0);
- p = &name[3];
+ p += 3;
}
} else {
v = (digit_to_bits(ch1)<<4) | (digit_to_bits(ch2)<<0);
- p = &name[2];
+ p += 2;
}
} else {
v = (digit_to_bits(ch1)<<0);
- p = &name[1];
+ p++;
}
- } else {
+ } else
v = 0;
- p = name;
- }
if ( *p == '/' ) {
p++;
ch1 = p[0];