ALT Linux Bugzilla
– Attachment 6312 Details for
Bug 29813
Отсутствует libip6t_NETFLOW.so
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
добавление libip6t_NETFLOW.so
iptables-libip6t_NETFLOW.patch (text/plain), 4.34 KB, created by
Sergey Y. Afonin
on 2015-06-29 14:59:28 MSK
(
hide
)
Description:
добавление libip6t_NETFLOW.so
Filename:
MIME Type:
Creator:
Sergey Y. Afonin
Created:
2015-06-29 14:59:28 MSK
Size:
4.34 KB
patch
obsolete
>commit 0fd98876c7e8b3f38143f5a186bf291082f1b04c >Author: Sergey Y. Afonin <asy@altlinux.org> >Date: Sun Jun 21 02:02:57 2015 +0400 > > 1.4.21-alt3 > > - Updated libipt_NETFLOW.c from ipt_netflow 2.1, > built libip6t_NETFLOW.so (closes: #29813) > >diff --git a/extensions/libip6t_NETFLOW.c b/extensions/libip6t_NETFLOW.c >new file mode 120000 >index 0000000..befc294 >--- /dev/null >+++ b/extensions/libip6t_NETFLOW.c >@@ -0,0 +1 @@ >+libipt_NETFLOW.c >\ No newline at end of file >diff --git a/extensions/libipt_NETFLOW.c b/extensions/libipt_NETFLOW.c >index 8587ba0..ec55467 100644 >--- a/extensions/libipt_NETFLOW.c >+++ b/extensions/libipt_NETFLOW.c >@@ -1,13 +1,117 @@ >-/* Shared library add-on to iptables to add NETFLOW target support. */ >+/* >+ * iptables helper for NETFLOW target >+ * <abc@telekom.ru> >+ * >+ * >+ * This file is part of NetFlow exporting module. >+ * >+ * This program is free software: you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+ * the Free Software Foundation, either version 2 of the License, or >+ * (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License >+ * along with this program. If not, see <http://www.gnu.org/licenses/>. >+ * >+ */ >+ >+#include <stdio.h> >+#include <string.h> >+#include <stdlib.h> >+#include <getopt.h> >+#include <net/if.h> >+#include <sys/socket.h> >+#include <netinet/in.h> >+#include <arpa/inet.h> >+ >+#define __EXPORTED_HEADERS__ >+#ifdef XTABLES > #include <xtables.h> >+#else >+#include <iptables.h> >+#endif >+ >+#ifdef XTABLES_VERSION_CODE // since 1.4.1 >+#define MOD140 >+#define iptables_target xtables_target >+#endif >+ >+#ifdef iptables_target // only in 1.4.0 >+#define MOD140 >+#endif >+ >+#ifdef MOD140 >+#define ipt_entry_target xt_entry_target >+#define register_target xtables_register_target >+#define _IPT_ENTRY void >+#define _IPT_IP void >+#ifndef IPT_ALIGN >+#define IPT_ALIGN XT_ALIGN >+#endif >+#else // before 1.3.x >+#define _IPT_ENTRY struct ipt_entry >+#define _IPT_IP struct ipt_ip >+#endif >+ >+#ifndef IPTABLES_VERSION >+#define IPTABLES_VERSION XTABLES_VERSION >+#endif >+ >+static struct option opts[] = { >+ { 0 } >+}; >+ >+static void help(void) >+{ >+ printf("NETFLOW target\n"); >+} >+ >+static int parse(int c, char **argv, int invert, unsigned int *flags, >+ const _IPT_ENTRY *entry, >+ struct ipt_entry_target **targetinfo) >+ >+{ >+ return 1; >+} >+ >+static void final_check(unsigned int flags) >+{ >+} >+ >+static void save(const _IPT_IP *ip, const struct ipt_entry_target *match) >+{ >+} >+ >+static void print(const _IPT_IP *ip, >+ const struct ipt_entry_target *target, >+ int numeric) >+{ >+ printf("NETFLOW "); >+} > >-static struct xtables_target netflow = { >+static struct iptables_target netflow = { >+ .next = NULL, > .name = "NETFLOW", >- .version = XTABLES_VERSION, >- .family = NFPROTO_IPV4, >+ .version = IPTABLES_VERSION, >+ .size = IPT_ALIGN(0), >+ .userspacesize = IPT_ALIGN(0), >+ .help = &help, >+ .parse = &parse, >+ .final_check = &final_check, >+ .print = &print, >+ .save = &save, >+ .extra_opts = opts > }; > >+#ifndef _init >+#define _init __attribute__((constructor)) _INIT >+#endif > void _init(void) > { >- xtables_register_target(&netflow); >+ register_target(&netflow); > } >diff --git a/iptables.spec b/iptables.spec >index 73b5e73..1e7383d 100644 >--- a/iptables.spec >+++ b/iptables.spec >@@ -1,6 +1,6 @@ > Name: iptables > Version: 1.4.21 >-Release: alt2 >+Release: alt3 > > Summary: Tools for managing Linux kernel packet filtering capabilities > License: GPLv2+ >@@ -94,7 +94,7 @@ operates with netfilter. > %setup -n %name-%version-%release > > %build >-%add_optflags -fno-strict-aliasing >+%add_optflags -fno-strict-aliasing -DXTABLES > %autoreconf > %configure \ > %{subst_enable static} \ >@@ -223,6 +223,10 @@ fi > %endif > > %changelog >+* Sun Jun 21 2015 Sergey Y. Afonin <asy@altlinux.ru> 1.4.21-alt3 >+- Updated libipt_NETFLOW.c from ipt_netflow 2.1, >+ built libip6t_NETFLOW.so (closes: #29813) >+ > * Sat Feb 14 2015 Anton Farygin <rider@altlinux.ru> 1.4.21-alt2 > - xtables: SET target: Add mapping of meta informations > (skbinfo ipset extension) (closes: #30729)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 29813
: 6312