[packages/ebtables/legacy] - updated to 2.0.11; now packaged as ebtables-legacy* - removed obsolete audit,linkfix,norootinst,ip

qboosh qboosh at pld-linux.org
Thu Jan 30 19:31:07 CET 2020


commit 1b4fcad63d4c16ce872d9867420656d9f290ca5f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jan 30 19:31:15 2020 +0100

    - updated to 2.0.11; now packaged as ebtables-legacy*
    - removed obsolete audit,linkfix,norootinst,ipv6_netmask_printing_fix patches

 ebtables-audit.patch            | 157 ----------------------------------------
 ebtables-linkfix.patch          |  16 ----
 ebtables-norootinst.patch       |  66 -----------------
 ebtables.init                   |  14 ++--
 ebtables.spec                   |  57 +++++++--------
 ipv6_netmask_printing_fix.patch |  54 --------------
 6 files changed, 35 insertions(+), 329 deletions(-)
---
diff --git a/ebtables.spec b/ebtables.spec
index 46d3613..add3a22 100644
--- a/ebtables.spec
+++ b/ebtables.spec
@@ -1,21 +1,17 @@
-%define		ver	2.0.10
-%define		vermin	4
 Summary:	Ethernet Bridge Tables
 Summary(pl.UTF-8):	Ethernet Bridge Tables - filtrowanie i translacja adresów dla Ethernetu
 Name:		ebtables
-Version:	%{ver}.%{vermin}
-Release:	5
+Version:	2.0.11
+Release:	1
 License:	GPL v2+
 Group:		Networking/Daemons
-Source0:	http://downloads.sourceforge.net/ebtables/%{name}-v%{ver}-%{vermin}.tar.gz
-# Source0-md5:	506742a3d44b9925955425a659c1a8d0
+Source0:	http://ftp.netfilter.org/pub/ebtables/%{name}-%{version}.tar.gz
+# Source0-md5:	071c8b0a59241667a0044fb040d4fc72
 Source1:	%{name}.init
 Source2:	%{name}-config
-Patch0:		ebtables-audit.patch
-Patch1:		ebtables-linkfix.patch
-Patch2:		ebtables-norootinst.patch
-Patch3:		ipv6_netmask_printing_fix.patch
 URL:		http://ebtables.sourceforge.net/
+# <linux/netfilter/xt_AUDIT.h>
+BuildRequires:	linux-libc-headers >= 6:3.0
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 Requires:	rc-scripts
@@ -39,33 +35,34 @@ dopasowywanie ramek. Infrastruktura ebtables jest częścią
 standardowych jąder Linuksa w wersjach 2.5.x i nowszych.
 
 %prep
-%setup -q -n %{name}-v%{ver}-%{vermin}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+%setup -q
 
 %build
+%configure
+
+%{__make}
+
+%if 0
 %{__make} \
 	CC="%{__cc}" \
 	CFLAGS="%{rpmcflags}" \
 	LIBDIR="%{_libdir}/ebtables" \
 	BINDIR="%{_sbindir}" \
 	MANDIR="%{_mandir}"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d,%{_sysconfdir}} \
-	$RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/ebtables,%{_mandir}/man8}
+install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
 
-install ebtables{,-restore,-save}	$RPM_BUILD_ROOT%{_sbindir}
-install ethertypes		$RPM_BUILD_ROOT%{_sysconfdir}
-install ebtables.8		$RPM_BUILD_ROOT%{_mandir}/man8
-install extensions/*.so	*.so	$RPM_BUILD_ROOT%{_libdir}/ebtables
-%{__sed} -i -e "s|__EXEC_PATH__|%{_sbindir}|g" $RPM_BUILD_ROOT%{_sbindir}/ebtables-save
+# could be useful only for plugins development, but headers are not installed
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libebtc.{la,so}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ebtables-config
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ebtables-config
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -85,9 +82,11 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ebtables-config
 %attr(754,root,root) /etc/rc.d/init.d/ebtables
-%attr(755,root,root) %{_sbindir}/ebtables
-%attr(755,root,root) %{_sbindir}/ebtables-restore
-%attr(755,root,root) %{_sbindir}/ebtables-save
-%dir %{_libdir}/ebtables
-%attr(755,root,root) %{_libdir}/ebtables/libebt*.so
-%{_mandir}/man8/ebtables.8*
+%attr(755,root,root) %{_sbindir}/ebtables-legacy
+%attr(755,root,root) %{_sbindir}/ebtables-legacy-restore
+%attr(755,root,root) %{_sbindir}/ebtables-legacy-save
+%attr(755,root,root) %{_sbindir}/ebtablesd
+%attr(755,root,root) %{_sbindir}/ebtablesu
+%attr(755,root,root) %{_libdir}/libebtc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libebtc.so.0
+%{_mandir}/man8/ebtables-legacy.8*
diff --git a/ebtables-audit.patch b/ebtables-audit.patch
deleted file mode 100644
index c1d85e9..0000000
--- a/ebtables-audit.patch
+++ /dev/null
@@ -1,157 +0,0 @@
---- ebtables2.orig/extensions/ebt_AUDIT.c	1970-01-01 01:00:00.000000000 +0100
-+++ ebtables2.orig/extensions/ebt_AUDIT.c	2011-01-07 10:53:46.680329228 +0100
-@@ -0,0 +1,110 @@ 
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <getopt.h>
-+#include "../include/ebtables_u.h"
-+#include <linux/netfilter/xt_AUDIT.h>
-+
-+#define AUDIT_TYPE  '1'
-+static struct option opts[] =
-+{
-+	{ "audit-type" , required_argument, 0, AUDIT_TYPE },
-+	{ 0 }
-+};
-+
-+static void print_help()
-+{
-+	printf(
-+	"AUDIT target options:\n"
-+	" --audit-type TYPE          : Set action type to record.\n");
-+}
-+
-+static void init(struct ebt_entry_target *target)
-+{
-+	struct xt_AUDIT_info *info = (struct xt_AUDIT_info *) target->data;
-+
-+	info->type = 0;
-+}
-+
-+static int parse(int c, char **argv, int argc,
-+   const struct ebt_u_entry *entry, unsigned int *flags,
-+   struct ebt_entry_target **target)
-+{
-+	struct xt_AUDIT_info *info = (struct xt_AUDIT_info *) (*target)->data;
-+
-+	switch (c) {
-+	case AUDIT_TYPE:
-+		ebt_check_option2(flags, AUDIT_TYPE);
-+
-+		if (!strcasecmp(optarg, "accept"))
-+			info->type = XT_AUDIT_TYPE_ACCEPT;
-+		else if (!strcasecmp(optarg, "drop"))
-+			info->type = XT_AUDIT_TYPE_DROP;
-+		else if (!strcasecmp(optarg, "reject"))
-+			info->type = XT_AUDIT_TYPE_REJECT;
-+		else
-+			ebt_print_error2("Bad action type value `%s'", optarg);
-+
-+		break;
-+	 default:
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+static void final_check(const struct ebt_u_entry *entry,
-+   const struct ebt_entry_match *match, const char *name,
-+   unsigned int hookmask, unsigned int time)
-+{
-+}
-+
-+static void print(const struct ebt_u_entry *entry,
-+   const struct ebt_entry_target *target)
-+{
-+	const struct xt_AUDIT_info *info =
-+		(const struct xt_AUDIT_info *) target->data;
-+
-+	printf("--audit-type ");
-+
-+	switch(info->type) {
-+	case XT_AUDIT_TYPE_ACCEPT:
-+		printf("accept");
-+		break;
-+	case XT_AUDIT_TYPE_DROP:
-+		printf("drop");
-+		break;
-+	case XT_AUDIT_TYPE_REJECT:
-+		printf("reject");
-+		break;
-+	}
-+}
-+
-+static int compare(const struct ebt_entry_target *t1,
-+   const struct ebt_entry_target *t2)
-+{
-+	const struct xt_AUDIT_info *info1 =
-+		(const struct xt_AUDIT_info *) t1->data;
-+	const struct xt_AUDIT_info *info2 =
-+		(const struct xt_AUDIT_info *) t2->data;
-+
-+	return info1->type == info2->type;
-+}
-+
-+static struct ebt_u_target AUDIT_target =
-+{
-+	.name		= "AUDIT",
-+	.size		= sizeof(struct xt_AUDIT_info),
-+	.help		= print_help,
-+	.init		= init,
-+	.parse		= parse,
-+	.final_check	= final_check,
-+	.print		= print,
-+	.compare	= compare,
-+	.extra_ops	= opts,
-+};
-+
-+void _init(void)
-+{
-+	ebt_register_target(&AUDIT_target);
-+}
---- ebtables2.orig/extensions/Makefile	2011-01-07 10:55:28.077246240 +0100
-+++ ebtables2.orig/extensions/Makefile	2011-01-07 10:53:46.686329230 +0100
-@@ -1,7 +1,7 @@ 
- #! /usr/bin/make
- 
- EXT_FUNC+=802_3 nat arp arpreply ip ip6 standard log redirect vlan mark_m mark \
--          pkttype stp among limit ulog nflog
-+          pkttype stp among limit ulog nflog AUDIT
- EXT_TABLES+=filter nat broute
- EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/ebt_$(T).o)
- EXT_OBJS+=$(foreach T,$(EXT_TABLES), extensions/ebtable_$(T).o)
---- a/include/linux/netfilter/xt_AUDIT.h	
-+++ a/include/linux/netfilter/xt_AUDIT.h	
-@@ -0,0 +1,30 @@ 
-+/*
-+ * Header file for iptables xt_AUDIT target
-+ *
-+ * (C) 2010-2011 Thomas Graf <tgraf at redhat.com>
-+ * (C) 2010-2011 Red Hat, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+#ifndef _XT_AUDIT_TARGET_H
-+#define _XT_AUDIT_TARGET_H
-+
-+#include <linux/types.h>
-+
-+enum {
-+	XT_AUDIT_TYPE_ACCEPT = 0,
-+	XT_AUDIT_TYPE_DROP,
-+	XT_AUDIT_TYPE_REJECT,
-+	__XT_AUDIT_TYPE_MAX,
-+};
-+
-+#define XT_AUDIT_TYPE_MAX (__XT_AUDIT_TYPE_MAX - 1)
-+
-+struct xt_AUDIT_info {
-+	__u8 type; /* XT_AUDIT_TYPE_* */
-+};
-+
-+#endif /* _XT_AUDIT_TARGET_H */
diff --git a/ebtables-linkfix.patch b/ebtables-linkfix.patch
deleted file mode 100644
index b140d72..0000000
--- a/ebtables-linkfix.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up ebtables-v2.0.10-4/extensions/Makefile.linkfix ebtables-v2.0.10-4/extensions/Makefile
---- ebtables-v2.0.10-4/extensions/Makefile.linkfix	2011-12-15 15:02:47.000000000 -0500
-+++ ebtables-v2.0.10-4/extensions/Makefile	2012-04-05 15:52:09.563511746 -0400
-@@ -9,9 +9,10 @@ EXT_LIBS+=$(foreach T,$(EXT_FUNC), exten
- EXT_LIBS+=$(foreach T,$(EXT_TABLES), extensions/libebtable_$(T).so)
- EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -lebt_$(T))
- EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
-+EXT_LDFLAGS+=-L. -lebtc
- 
--extensions/ebt_%.so: extensions/ebt_%.o
--	$(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
-+extensions/ebt_%.so: extensions/ebt_%.o libebtc.so
-+	$(CC) $(LDFLAGS) $(EXT_LDFLAGS) -shared -o $@ -lc $< -nostartfiles
- 
- extensions/libebt_%.so: extensions/ebt_%.so
- 	mv $< $@
diff --git a/ebtables-norootinst.patch b/ebtables-norootinst.patch
deleted file mode 100644
index 0017720..0000000
--- a/ebtables-norootinst.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -up ebtables-v2.0.10-1/Makefile.orig ebtables-v2.0.10-1/Makefile
---- ebtables-v2.0.10-1/Makefile.orig	2011-07-10 05:28:52.000000000 -0400
-+++ ebtables-v2.0.10-1/Makefile	2011-07-11 10:45:00.323426448 -0400
-@@ -157,31 +157,31 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
- scripts: ebtables-save ebtables.sysv ebtables-config
- 	cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
- 	mkdir -p $(DESTDIR)$(BINDIR)
--	install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
-+	install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
- 	cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
- 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
--	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
-+	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
- 	cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
- 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
--	if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
-+	if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
- 	rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
- 
- tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
- $(MANDIR)/man8/ebtables.8: ebtables.8
- 	mkdir -p $(DESTDIR)$(@D)
- 	sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
--	install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
-+	install -m 0644 ebtables.8_ $(DESTDIR)$@
- 	rm -f ebtables.8_
- 
- $(DESTDIR)$(ETHERTYPESFILE): ethertypes
- 	mkdir -p $(@D)
--	install -m 0644 -o root -g root $< $@
-+	install -m 0644 $< $@
- 
- .PHONY: exec
- exec: ebtables ebtables-restore
- 	mkdir -p $(DESTDIR)$(BINDIR)
--	install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
--	install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
-+	install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
-+	install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
- 
- .PHONY: install
- install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) exec scripts
-@@ -205,18 +205,18 @@ release:
- 	rm -f extensions/ebt_inat.c
- 	rm -rf $(CVSDIRS)
- 	mkdir -p include/linux/netfilter_bridge
--	install -m 0644 -o root -g root \
-+	install -m 0644 \
- 		$(KERNEL_INCLUDES)/linux/netfilter_bridge.h include/linux/
- # To keep possible compile error complaints about undefined ETH_P_8021Q
- # off my back
--	install -m 0644 -o root -g root \
-+	install -m 0644 \
- 		$(KERNEL_INCLUDES)/linux/if_ether.h include/linux/
--	install -m 0644 -o root -g root \
-+	install -m 0644 \
- 		$(KERNEL_INCLUDES)/linux/types.h include/linux/
--	install -m 0644 -o root -g root \
-+	install -m 0644 \
- 		$(KERNEL_INCLUDES)/linux/netfilter_bridge/*.h \
- 		include/linux/netfilter_bridge/
--	install -m 0644 -o root -g root \
-+	install -m 0644 \
- 		include/ebtables.h include/linux/netfilter_bridge/
- 	make clean
- 	touch *
diff --git a/ebtables.init b/ebtables.init
index f158a64..72de045 100755
--- a/ebtables.init
+++ b/ebtables.init
@@ -34,10 +34,10 @@ start() {
 		show "Starting Ethernet bridge filtering (ebtables)"
 		if is_yes "$EBTABLES_BINARY_FORMAT"; then
 			for table in $(ls /etc/sysconfig/ebtables.* 2>/dev/null | sed -e 's/.*ebtables\.//' -e '/save/d' ); do
-				/usr/sbin/ebtables -t $table --atomic-file /etc/sysconfig/ebtables.$table --atomic-commit || RETVAL=1
+				/usr/sbin/ebtables-legacy -t $table --atomic-file /etc/sysconfig/ebtables.$table --atomic-commit || RETVAL=1
 			done
 		else
-			/usr/sbin/ebtables-restore < /etc/sysconfig/ebtables || RETVAL=1
+			/usr/sbin/ebtables-legacy-restore < /etc/sysconfig/ebtables || RETVAL=1
 		fi
 
 		if [ $RETVAL -eq 0 ]; then
@@ -52,7 +52,7 @@ start() {
 stop() {
 	show "Stopping Ethernet bridge filtering (ebtables)"
 	for table in $(grep '^ebtable_' /proc/modules | sed -e 's/ebtable_\([^ ]*\).*/\1/'); do
-		/usr/sbin/ebtables -t $table --init-table || RETVAL=1
+		/usr/sbin/ebtables-legacy -t $table --init-table || RETVAL=1
 	done
 
 	if [ $RETVAL -eq 0 ]; then
@@ -75,7 +75,7 @@ save() {
 			chmod 0600 /etc/sysconfig/ebtables
 			mv -f /etc/sysconfig/ebtables /etc/sysconfig/ebtables.save
 		fi
-		/usr/sbin/ebtables-save > /etc/sysconfig/ebtables || RETVAL=1
+		/usr/sbin/ebtables-legacy-save > /etc/sysconfig/ebtables || RETVAL=1
 	fi
 	if is_yes "$EBTABLES_BINARY_FORMAT"; then
 		rm -f /etc/sysconfig/ebtables.*.save
@@ -84,9 +84,9 @@ save() {
 			mv -f $oldtable $oldtable.save
 		done
 		for table in $(grep '^ebtable_' /proc/modules | sed -e 's/ebtable_\([^ ]*\).*/\1/'); do
-			/usr/sbin/ebtables -t $table --atomic-file /etc/sysconfig/ebtables.$table --atomic-save || RETVAL=1
+			/usr/sbin/ebtables-legacy -t $table --atomic-file /etc/sysconfig/ebtables.$table --atomic-save || RETVAL=1
 			if [ "$EBTABLES_SAVE_COUNTER" = "no" ]; then
-				/usr/sbin/ebtables -t $table --atomic-file /etc/sysconfig/ebtables.$table -Z || RETVAL=1
+				/usr/sbin/ebtables-legacy -t $table --atomic-file /etc/sysconfig/ebtables.$table -Z || RETVAL=1
 			fi
 		done
 	fi
@@ -119,7 +119,7 @@ case "$1" in
 	;;
   status)
 	for table in $(grep '^ebtable_' /proc/modules | sed -e 's/ebtable_\([^ ]*\).*/\1/'); do
-		/usr/sbin/ebtables -t $table --list
+		/usr/sbin/ebtables-legacy -t $table --list
 	done
 	;;
   *)
diff --git a/ipv6_netmask_printing_fix.patch b/ipv6_netmask_printing_fix.patch
deleted file mode 100644
index c626267..0000000
--- a/ipv6_netmask_printing_fix.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/extensions/ebt_ip6.c b/extensions/ebt_ip6.c
-index 0465e77..52a8448 100644
---- a/extensions/ebt_ip6.c
-+++ b/extensions/ebt_ip6.c
-@@ -445,14 +445,14 @@ static void print(const struct ebt_u_entry *entry,
- 		if (ipinfo->invflags & EBT_IP6_SOURCE)
- 			printf("! ");
- 		printf("%s", ebt_ip6_to_numeric(&ipinfo->saddr));
--		printf("/%s ", ebt_ip6_to_numeric(&ipinfo->smsk));
-+		printf("%s ", ebt_ip6_mask_to_string(&ipinfo->smsk));
- 	}
- 	if (ipinfo->bitmask & EBT_IP6_DEST) {
- 		printf("--ip6-dst ");
- 		if (ipinfo->invflags & EBT_IP6_DEST)
- 			printf("! ");
- 		printf("%s", ebt_ip6_to_numeric(&ipinfo->daddr));
--		printf("/%s ", ebt_ip6_to_numeric(&ipinfo->dmsk));
-+		printf("%s ", ebt_ip6_mask_to_string(&ipinfo->dmsk));
- 	}
- 	if (ipinfo->bitmask & EBT_IP6_TCLASS) {
- 		printf("--ip6-tclass ");
-diff --git a/include/ebtables_u.h b/include/ebtables_u.h
-index ab615c1..35a5bcc 100644
---- a/include/ebtables_u.h
-+++ b/include/ebtables_u.h
-@@ -303,6 +303,7 @@ char *ebt_mask_to_dotted(uint32_t mask);
- void ebt_parse_ip6_address(char *address, struct in6_addr *addr, 
- 						   struct in6_addr *msk);
- char *ebt_ip6_to_numeric(const struct in6_addr *addrp);
-+char *ebt_ip6_mask_to_string(const struct in6_addr *msk);
- 
- 
- int do_command(int argc, char *argv[], int exec_style,
-diff --git a/useful_functions.c b/useful_functions.c
-index d20b68e..2f73589 100644
---- a/useful_functions.c
-+++ b/useful_functions.c
-@@ -411,3 +411,16 @@ char *ebt_ip6_to_numeric(const struct in6_addr *addrp)
- 	static char buf[50+1];
- 	return (char *)inet_ntop(AF_INET6, addrp, buf, sizeof(buf));
- }
-+
-+char *ebt_ip6_mask_to_string(const struct in6_addr *msk)
-+{
-+   	/* /0000:0000:0000:0000:0000:000.000.000.000
-+	 * /0000:0000:0000:0000:0000:0000:0000:0000 */
-+	static char buf[51+1];
-+	if (msk->s6_addr32[0] == 0xFFFFFFFFL && msk->s6_addr32[1] == 0xFFFFFFFFL &&
-+	    msk->s6_addr32[2] == 0xFFFFFFFFL && msk->s6_addr32[3] == 0xFFFFFFFFL)
-+		*buf = '\0';
-+	else
-+		sprintf(buf, "/%s", ebt_ip6_to_numeric(msk));
-+	return buf;
-+}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ebtables.git/commitdiff/1b4fcad63d4c16ce872d9867420656d9f290ca5f



More information about the pld-cvs-commit mailing list