summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb-translate.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-11-22 03:05:19 +0100
committerPhil Sutter <phil@nwl.cc>2023-12-05 16:35:37 +0100
commit79de02f8c20222adb5e837b074b1ce14d9c40189 (patch)
treeda2a6cf40616c10ec467c8e4885aa9ba151b64b1 /iptables/xtables-eb-translate.c
parent17a5f3ae86897f6c55bc90d3757f522daa734fc8 (diff)
ebtables: Change option values to avoid clashes
In order to parse input using do_parse(), distinct ebtables option's values have to be distinct from others. Since arptables uses values 2-8 already, resort to values >10. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-eb-translate.c')
-rw-r--r--iptables/xtables-eb-translate.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/iptables/xtables-eb-translate.c b/iptables/xtables-eb-translate.c
index d0fec9c6..a2ab318c 100644
--- a/iptables/xtables-eb-translate.c
+++ b/iptables/xtables-eb-translate.c
@@ -292,9 +292,9 @@ print_zero:
table_set = true;
break;
case 'i': /* Input interface */
- case 2 : /* Logical input interface */
+ case 15 : /* Logical input interface */
case 'o': /* Output interface */
- case 3 : /* Logical output interface */
+ case 16 : /* Logical output interface */
case 'j': /* Target */
case 'p': /* Net family protocol */
case 's': /* Source mac */
@@ -316,7 +316,7 @@ print_zero:
ebtables_parse_interface(optarg, cs.eb.in);
break;
- } else if (c == 2) {
+ } else if (c == 15) {
ebt_check_option2(&flags, OPT_LOGICALIN);
if (selected_chain > 2 && selected_chain < NF_BR_BROUTING)
xtables_error(PARAMETER_PROBLEM,
@@ -336,7 +336,7 @@ print_zero:
ebtables_parse_interface(optarg, cs.eb.out);
break;
- } else if (c == 3) {
+ } else if (c == 16) {
ebt_check_option2(&flags, OPT_LOGICALOUT);
if (selected_chain < 2 || selected_chain == NF_BR_BROUTING)
xtables_error(PARAMETER_PROBLEM,
@@ -424,14 +424,14 @@ print_zero:
xtables_error(PARAMETER_PROBLEM,
"Sorry, protocols have values above or equal to 0x0600");
break;
- case 4 : /* Lc */
+ case 17 : /* Lc */
ebt_check_option2(&flags, LIST_C);
if (command != 'L')
xtables_error(PARAMETER_PROBLEM,
"Use --Lc with -L");
flags |= LIST_C;
break;
- case 5 : /* Ln */
+ case 18 : /* Ln */
ebt_check_option2(&flags, LIST_N);
if (command != 'L')
xtables_error(PARAMETER_PROBLEM,
@@ -441,7 +441,7 @@ print_zero:
"--Lx is not compatible with --Ln");
flags |= LIST_N;
break;
- case 6 : /* Lx */
+ case 19 : /* Lx */
ebt_check_option2(&flags, LIST_X);
if (command != 'L')
xtables_error(PARAMETER_PROBLEM,