]> git.pld-linux.org Git - packages/iptables.git/commitdiff
Fix segfault in 'ebtables -X'
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Mon, 3 Jul 2017 10:07:17 +0000 (12:07 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Mon, 3 Jul 2017 10:54:17 +0000 (12:54 +0200)
Fixes:
> /usr/sbin/ebtables -t nat -X something
> Segmentation fault (core dumped)

Makes '-X' argument mandatory, but the code is not ready for omitting it
anyway.

Release: 2

ebtables-X.patch [new file with mode: 0644]
iptables.spec

diff --git a/ebtables-X.patch b/ebtables-X.patch
new file mode 100644 (file)
index 0000000..bf65ef5
--- /dev/null
@@ -0,0 +1,12 @@
+diff -dur iptables-1.6.1.orig/iptables/xtables-eb.c iptables-1.6.1/iptables/xtables-eb.c
+--- iptables-1.6.1.orig/iptables/xtables-eb.c  2017-01-26 17:11:58.000000000 +0100
++++ iptables-1.6.1/iptables/xtables-eb.c       2017-07-03 12:06:20.000000000 +0200
+@@ -776,7 +776,7 @@
+       /* Getopt saves the day */
+       while ((c = getopt_long(argc, argv,
+-         "-A:D:C:I:N:E:X::L::Z::F::P:Vhi:o:j:c:p:s:d:t:M:", opts, NULL)) != -1) {
++         "-A:D:C:I:N:E:X:L::Z::F::P:Vhi:o:j:c:p:s:d:t:M:", opts, NULL)) != -1) {
+               cs.c = c;
+               cs.invert = ebt_invert;
+               switch (c) {
index d43f212039467ded230e4f53b52189180e241685..fe7de34d5d86e5a53b184ebc88c9a1ed1d676525 100644 (file)
@@ -34,7 +34,7 @@ Summary(uk.UTF-8):    Утиліти для керування пакетними 
 Summary(zh_CN.UTF-8):  Linux内核包过滤管理工具
 Name:          iptables%{?with_vserver:-vserver}
 Version:       1.6.1
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Networking/Admin
 Source0:       ftp://ftp.netfilter.org/pub/iptables/%{orgname}-%{version}.tar.bz2
@@ -57,6 +57,7 @@ Patch1:               %{orgname}-batch.patch
 Patch2:                no-libiptc.patch
 Patch3:                %{orgname}-aligned_u64.patch
 Patch4:                %{orgname}-ebtables.patch
+Patch5:                ebtables-X.patch
 # --- ADDITIONAL/CHANGED EXTENSIONS:
 # just ipt_IPV4OPTSSTRIP now
 Patch10:       %{orgname}-20070806.patch
@@ -209,6 +210,7 @@ iptables(8).
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %{?with_ipt_IPV4OPTSSTRIP:%patch10 -p1}
 %{?with_xt_layer7:%patch11 -p1}
This page took 0.046132 seconds and 4 git commands to generate.