blob: 7cfe128babf44b89f7280bfabc791efaf005c9b6 (
plain)
1 diff --git a/ebtables-save.in b/ebtables-save.in
2 index 17924a2..c7a64c3 100644
3 --- a/ebtables-save.in
4 +++ b/ebtables-save.in
5 @@ -12,6 +12,7 @@ my $ebtables = "@sbindir@/ebtables";
6 my $cnt = "";
7 my $version = "1.0";
8 my $table_name;
9 +my @table_names;
10
11 # ========================================================
12 # Process filter table
13 @@ -49,6 +50,13 @@ sub process_table {
14 }
15 # ========================================================
16
17 +if ($#ARGV + 1 == 0) {
18 + @table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`);
19 +}
20 +else {
21 + @table_names = @ARGV;
22 +}
23 +# ========================================================
24 unless (-x $ebtables) { exit -1 };
25 print "# Generated by ebtables-save v$version (legacy) on " . `date`;
26 if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") {
|