summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardyHarald Welte <kaber@trash.netlaforge@gnumonks.org>2006-04-22 02:08:12 +0000
committerPatrick McHardyHarald Welte <kaber@trash.netlaforge@gnumonks.org>2006-04-22 02:08:12 +0000
commit2cfbd9f565e91356679bdee3f1e9b3133a9d14ad (patch)
treed28e837a692c5b613c2f6786e8c8d4d4e9754fbb
parent0eca33f8a830d1aaca53b590abe791109a9524e3 (diff)
In ip[6]tables.c, NUMBER_OF_OPT was increased to 12 for the OPT_COUNTERS
option. However, the new array element is not initialized in either commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] or inverse_for_options[NUMBER_OF_OPT]. (Closes: #462)
-rw-r--r--ip6tables.c31
-rw-r--r--iptables.c31
2 files changed, 32 insertions, 30 deletions
diff --git a/ip6tables.c b/ip6tables.c
index ae3cb621..82e95950 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -158,20 +158,20 @@ static unsigned int global_option_offset = 0;
static char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] =
/* Well, it's better than "Re: Linux vs FreeBSD" */
{
- /* -n -s -d -p -j -v -x -i -o --line */
-/*INSERT*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x'},
-/*DELETE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x'},
-/*DELETE_NUM*/{'x','x','x','x','x',' ','x','x','x','x'},
-/*REPLACE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x'},
-/*APPEND*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x'},
-/*LIST*/ {' ','x','x','x','x',' ',' ','x','x',' '},
-/*FLUSH*/ {'x','x','x','x','x',' ','x','x','x','x'},
-/*ZERO*/ {'x','x','x','x','x',' ','x','x','x','x'},
-/*NEW_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x'},
-/*DEL_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x'},
-/*SET_POLICY*/{'x','x','x','x','x',' ','x','x','x','x'},
-/*CHECK*/ {'x','+','+','+','x',' ','x',' ',' ','x'},
-/*RENAME*/ {'x','x','x','x','x',' ','x','x','x','x'}
+ /* -n -s -d -p -j -v -x -i -o --line -c */
+/*INSERT*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x',' '},
+/*DELETE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x','x'},
+/*DELETE_NUM*/{'x','x','x','x','x',' ','x','x','x','x','x'},
+/*REPLACE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x',' '},
+/*APPEND*/ {'x',' ',' ',' ',' ',' ','x',' ',' ','x',' '},
+/*LIST*/ {' ','x','x','x','x',' ',' ','x','x',' ','x'},
+/*FLUSH*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
+/*ZERO*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
+/*NEW_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
+/*DEL_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
+/*SET_POLICY*/{'x','x','x','x','x',' ','x','x','x','x','x'},
+/*CHECK*/ {'x','+','+','+','x',' ','x',' ',' ','x','x'},
+/*RENAME*/ {'x','x','x','x','x',' ','x','x','x','x','x'}
};
static int inverse_for_options[NUMBER_OF_OPT] =
@@ -185,7 +185,8 @@ static int inverse_for_options[NUMBER_OF_OPT] =
/* -x */ 0,
/* -i */ IP6T_INV_VIA_IN,
/* -o */ IP6T_INV_VIA_OUT,
-/*--line*/ 0
+/*--line*/ 0,
+/* -c */ 0,
};
const char *program_version;
diff --git a/iptables.c b/iptables.c
index 4cb9ae4d..ea0eae36 100644
--- a/iptables.c
+++ b/iptables.c
@@ -159,20 +159,20 @@ static unsigned int global_option_offset = 0;
static char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] =
/* Well, it's better than "Re: Linux vs FreeBSD" */
{
- /* -n -s -d -p -j -v -x -i -o -f --line */
-/*INSERT*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x'},
-/*DELETE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x'},
-/*DELETE_NUM*/{'x','x','x','x','x',' ','x','x','x','x','x'},
-/*REPLACE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x'},
-/*APPEND*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x'},
-/*LIST*/ {' ','x','x','x','x',' ',' ','x','x','x',' '},
-/*FLUSH*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
-/*ZERO*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
-/*NEW_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
-/*DEL_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x'},
-/*SET_POLICY*/{'x','x','x','x','x',' ','x','x','x','x','x'},
-/*CHECK*/ {'x','+','+','+','x',' ','x',' ',' ',' ','x'},
-/*RENAME*/ {'x','x','x','x','x',' ','x','x','x','x','x'}
+ /* -n -s -d -p -j -v -x -i -o -f --line -c */
+/*INSERT*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x',' '},
+/*DELETE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x','x'},
+/*DELETE_NUM*/{'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*REPLACE*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x',' '},
+/*APPEND*/ {'x',' ',' ',' ',' ',' ','x',' ',' ',' ','x',' '},
+/*LIST*/ {' ','x','x','x','x',' ',' ','x','x','x',' ','x'},
+/*FLUSH*/ {'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*ZERO*/ {'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*NEW_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*DEL_CHAIN*/ {'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*SET_POLICY*/{'x','x','x','x','x',' ','x','x','x','x','x','x'},
+/*CHECK*/ {'x','+','+','+','x',' ','x',' ',' ',' ','x','x'},
+/*RENAME*/ {'x','x','x','x','x',' ','x','x','x','x','x','x'}
};
static int inverse_for_options[NUMBER_OF_OPT] =
@@ -187,7 +187,8 @@ static int inverse_for_options[NUMBER_OF_OPT] =
/* -i */ IPT_INV_VIA_IN,
/* -o */ IPT_INV_VIA_OUT,
/* -f */ IPT_INV_FRAG,
-/*--line*/ 0
+/*--line*/ 0,
+/* -c */ 0,
};
const char *program_version;