1 |
pva 07/09/28 19:22:14 |
2 |
|
3 |
Modified: ebtables.confd ebtables.initd |
4 |
Added: ebtables-2.0.8.1-ebt-save.diff |
5 |
digest-ebtables-2.0.8.2 |
6 |
Removed: ebtables-2.0.6-gcc4.patch digest-ebtables-2.0.6-r1 |
7 |
ebtables-2.0.6-gcc34.patch README.gentoo.init |
8 |
digest-ebtables-2.0.8.1-r1 |
9 |
Log: |
10 |
Version bump. Finally init script works, thank Lech Perczak <lech.perczak AT multivision.pl>, bug #189315. Remove old. |
11 |
(Portage version: 2.1.3.10) |
12 |
|
13 |
Revision Changes Path |
14 |
1.2 net-firewall/ebtables/files/ebtables.confd |
15 |
|
16 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.confd?rev=1.2&view=markup |
17 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.confd?rev=1.2&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.confd?r1=1.1&r2=1.2 |
19 |
|
20 |
Index: ebtables.confd |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/net-firewall/ebtables/files/ebtables.confd,v |
23 |
retrieving revision 1.1 |
24 |
retrieving revision 1.2 |
25 |
diff -u -r1.1 -r1.2 |
26 |
--- ebtables.confd 2 Sep 2007 10:02:35 -0000 1.1 |
27 |
+++ ebtables.confd 28 Sep 2007 19:22:14 -0000 1.2 |
28 |
@@ -9,3 +9,7 @@ |
29 |
|
30 |
# Save state on stopping ebtables |
31 |
SAVE_ON_STOP="yes" |
32 |
+ |
33 |
+# Tables to be saved and restored. If you have built ebtables as modules, you |
34 |
+# may leave it blank. Otherwise, you MUST define which to control. |
35 |
+TABLE_NAMES="filter nat broute" |
36 |
|
37 |
|
38 |
|
39 |
1.2 net-firewall/ebtables/files/ebtables.initd |
40 |
|
41 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.initd?rev=1.2&view=markup |
42 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.initd?rev=1.2&content-type=text/plain |
43 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables.initd?r1=1.1&r2=1.2 |
44 |
|
45 |
Index: ebtables.initd |
46 |
=================================================================== |
47 |
RCS file: /var/cvsroot/gentoo-x86/net-firewall/ebtables/files/ebtables.initd,v |
48 |
retrieving revision 1.1 |
49 |
retrieving revision 1.2 |
50 |
diff -u -r1.1 -r1.2 |
51 |
--- ebtables.initd 2 Sep 2007 10:02:35 -0000 1.1 |
52 |
+++ ebtables.initd 28 Sep 2007 19:22:14 -0000 1.2 |
53 |
@@ -1,15 +1,15 @@ |
54 |
#!/sbin/runscript |
55 |
# Copyright 1999-2007 Gentoo Foundation |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/files/ebtables.initd,v 1.1 2007/09/02 10:02:35 pva Exp $ |
58 |
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/files/ebtables.initd,v 1.2 2007/09/28 19:22:14 pva Exp $ |
59 |
|
60 |
opts="save reload panic" |
61 |
|
62 |
ebtables_bin="/sbin/ebtables" |
63 |
ebtables_save=${EBTABLES_SAVE} |
64 |
ebtables_tables=$(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//) |
65 |
-if [ ebtables_tables == "" ] ; then |
66 |
- ebtables_tables="filter nat broute" |
67 |
+if [ "$ebtables_tables" == "" ] ; then |
68 |
+ ebtables_tables=${TABLE_NAMES} |
69 |
fi |
70 |
|
71 |
depend() { |
72 |
@@ -31,14 +31,6 @@ |
73 |
done |
74 |
} |
75 |
|
76 |
-checkkernel() { |
77 |
- if [ "$(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//)" == "" ] ; then |
78 |
- eerror "Your kernel lacks ebtables support, please load" |
79 |
- eerror "appropriate modules and try again." |
80 |
- return 1 |
81 |
- fi |
82 |
- return 0 |
83 |
-} |
84 |
checkconfig() { |
85 |
if [ ! -f ${ebtables_save} ] ; then |
86 |
eerror "Not starting ebtables. First create some rules then run:" |
87 |
@@ -59,7 +51,6 @@ |
88 |
if [ "${SAVE_ON_STOP}" = "yes" ] ; then |
89 |
save || return 1 |
90 |
fi |
91 |
- checkkernel || return 1 |
92 |
ebegin "Stopping bridge firewall" |
93 |
local a |
94 |
for a in ${ebtables_tables}; do |
95 |
@@ -72,7 +63,6 @@ |
96 |
} |
97 |
|
98 |
reload() { |
99 |
- checkkernel || return 1 |
100 |
ebegin "Flushing bridge firewall" |
101 |
local a |
102 |
for a in ${ebtables_tables}; do |
103 |
@@ -88,18 +78,17 @@ |
104 |
ebegin "Saving ebtables state" |
105 |
touch "${ebtables_save}" |
106 |
chmod 0600 "${ebtables_save}" |
107 |
- ${ebtables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" |
108 |
+ ${ebtables_bin}-save ${ebtables_tables} ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" |
109 |
eend $? |
110 |
} |
111 |
|
112 |
panic() { |
113 |
- checkkernel || return 1 |
114 |
service_started ebtables && svc_stop |
115 |
|
116 |
local a |
117 |
ebegin "Dropping all packets forwarded on bridges" |
118 |
for a in ${ebtables_tables}; do |
119 |
- ${ebtables_bin} -t $a -X |
120 |
+ ${ebtables_bin} -t $a -F |
121 |
${ebtables_bin} -t $a -X |
122 |
|
123 |
set_table_policy $a DROP |
124 |
|
125 |
|
126 |
|
127 |
1.1 net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff |
128 |
|
129 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff?rev=1.1&view=markup |
130 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/ebtables-2.0.8.1-ebt-save.diff?rev=1.1&content-type=text/plain |
131 |
|
132 |
Index: ebtables-2.0.8.1-ebt-save.diff |
133 |
=================================================================== |
134 |
--- ./ebtables-save.orig 2007-09-28 22:50:35.000000000 +0400 |
135 |
+++ ./ebtables-save 2007-09-28 22:51:22.000000000 +0400 |
136 |
@@ -12,6 +12,7 @@ |
137 |
my $cnt = ""; |
138 |
my $version = "1.0"; |
139 |
my $table_name; |
140 |
+my @table_names; |
141 |
|
142 |
# ======================================================== |
143 |
# Process filter table |
144 |
@@ -49,12 +50,19 @@ |
145 |
} |
146 |
# ======================================================== |
147 |
|
148 |
+if ($#ARGV + 1 == 0) { |
149 |
+ @table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`); |
150 |
+} |
151 |
+else { |
152 |
+ @table_names = @ARGV; |
153 |
+} |
154 |
+# ======================================================== |
155 |
unless (-x $ebtables) { exit -1 }; |
156 |
print "# Generated by ebtables-save v$version on " . `date`; |
157 |
if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") { |
158 |
$cnt = "--Lc"; |
159 |
} |
160 |
-foreach $table_name (split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`)) { |
161 |
+foreach $table_name (@table_names) { |
162 |
$table =`$ebtables -t $table_name -L $cnt`; |
163 |
unless ($? == 0) { print $table; exit -1 }; |
164 |
&process_table($table); |
165 |
|
166 |
|
167 |
|
168 |
1.1 net-firewall/ebtables/files/digest-ebtables-2.0.8.2 |
169 |
|
170 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/digest-ebtables-2.0.8.2?rev=1.1&view=markup |
171 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ebtables/files/digest-ebtables-2.0.8.2?rev=1.1&content-type=text/plain |
172 |
|
173 |
Index: digest-ebtables-2.0.8.2 |
174 |
=================================================================== |
175 |
MD5 66bcbcb2dcf3b981ad4e86e1720e796e ebtables-v2.0.8-2.tar.gz 97065 |
176 |
RMD160 b53fca7e2f34dd23ecb11af3804fa10c1702e815 ebtables-v2.0.8-2.tar.gz 97065 |
177 |
SHA256 dd78c0dfa0dbeb128952dec9e916be948bf561dcb8ba3149ea7ce0166a2caf9b ebtables-v2.0.8-2.tar.gz 97065 |
178 |
|
179 |
|
180 |
|
181 |
-- |
182 |
gentoo-commits@g.o mailing list |