|
|
05e71a |
From 522ae2fa8b610f13ae69835959dea710f808d887 Mon Sep 17 00:00:00 2001
|
|
|
05e71a |
From: Arturo Borrero Gonzalez <arturo@netfilter.org>
|
|
|
05e71a |
Date: Wed, 28 Nov 2018 13:47:28 +0100
|
|
|
05e71a |
Subject: [PATCH] ebtables: legacy renaming
|
|
|
05e71a |
|
|
|
05e71a |
The original ebtables tool is now the legacy version, let's rename it.
|
|
|
05e71a |
|
|
|
05e71a |
A more uptodate client of the ebtables tool is provided in the iptables
|
|
|
05e71a |
tarball (ebtables-nft). The new tool was formerly known as ebtables-compat.
|
|
|
05e71a |
|
|
|
05e71a |
The new -legacy binary has no problem if called via a symlink with the
|
|
|
05e71a |
'ebtables' name, so users can still name this binary with whatever name.
|
|
|
05e71a |
|
|
|
05e71a |
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
|
|
|
05e71a |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
05e71a |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
05e71a |
---
|
|
|
05e71a |
Makefile.am | 21 +++++++++++----------
|
|
|
05e71a |
ebtables.8.in => ebtables-legacy.8.in | 14 +++++++++++++-
|
|
|
05e71a |
ebtables-save.in | 2 +-
|
|
|
05e71a |
include/ebtables_u.h | 2 +-
|
|
|
05e71a |
4 files changed, 26 insertions(+), 13 deletions(-)
|
|
|
05e71a |
rename ebtables.8.in => ebtables-legacy.8.in (98%)
|
|
|
05e71a |
|
|
|
05e71a |
diff --git a/Makefile.am b/Makefile.am
|
|
|
05e71a |
index 14938fea4f252..b16a4d6dba269 100644
|
|
|
05e71a |
--- a/Makefile.am
|
|
|
05e71a |
+++ b/Makefile.am
|
|
|
05e71a |
@@ -26,11 +26,11 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_srcdir}/include \
|
|
|
05e71a |
-DEBTD_PIPE=\"${PIPE}\" -DEBTD_PIPE_DIR=\"${PIPE_DIR}\"
|
|
|
05e71a |
AM_CFLAGS = ${regular_CFLAGS}
|
|
|
05e71a |
|
|
|
05e71a |
-sbin_PROGRAMS = ebtables ebtablesd ebtablesu ebtables-restore
|
|
|
05e71a |
+sbin_PROGRAMS = ebtables-legacy ebtablesd ebtablesu ebtables-legacy-restore
|
|
|
05e71a |
EXTRA_PROGRAMS = static examples/ulog/test_ulog
|
|
|
05e71a |
sysconf_DATA = ethertypes
|
|
|
05e71a |
-sbin_SCRIPTS = ebtables-save
|
|
|
05e71a |
-man8_MANS = ebtables.8
|
|
|
05e71a |
+sbin_SCRIPTS = ebtables-legacy-save
|
|
|
05e71a |
+man8_MANS = ebtables-legacy.8
|
|
|
05e71a |
lib_LTLIBRARIES = libebtc.la
|
|
|
05e71a |
|
|
|
05e71a |
libebtc_la_SOURCES = \
|
|
|
05e71a |
@@ -47,21 +47,22 @@ libebtc_la_SOURCES = \
|
|
|
05e71a |
extensions/ebtable_nat.c
|
|
|
05e71a |
# Make sure ebtables.c can be built twice
|
|
|
05e71a |
libebtc_la_CPPFLAGS = ${AM_CPPFLAGS}
|
|
|
05e71a |
-ebtables_SOURCES = ebtables-standalone.c
|
|
|
05e71a |
-ebtables_LDADD = libebtc.la
|
|
|
05e71a |
+ebtables_legacy_SOURCES = ebtables-standalone.c
|
|
|
05e71a |
+ebtables_legacy_LDADD = libebtc.la
|
|
|
05e71a |
ebtablesd_LDADD = libebtc.la
|
|
|
05e71a |
-ebtables_restore_LDADD = libebtc.la
|
|
|
05e71a |
+ebtables_legacy_restore_SOURCES = ebtables-restore.c
|
|
|
05e71a |
+ebtables_legacy_restore_LDADD = libebtc.la
|
|
|
05e71a |
static_SOURCES = ebtables.c
|
|
|
05e71a |
static_LDFLAGS = -static
|
|
|
05e71a |
static_LDADD = libebtc.la
|
|
|
05e71a |
examples_ulog_test_ulog_SOURCES = examples/ulog/test_ulog.c getethertype.c
|
|
|
05e71a |
|
|
|
05e71a |
daemon: ebtablesd ebtablesu
|
|
|
05e71a |
-exec: ebtables ebtables-restore
|
|
|
05e71a |
+exec: ebtables-legacy ebtables-legacy-restore
|
|
|
05e71a |
|
|
|
05e71a |
-CLEANFILES = ebtables-save ebtables.sysv ebtables-config ebtables.8
|
|
|
05e71a |
+CLEANFILES = ebtables-legacy-save ebtables.sysv ebtables-config ebtables-legacy.8
|
|
|
05e71a |
|
|
|
05e71a |
-ebtables-save: ebtables-save.in ${top_builddir}/config.status
|
|
|
05e71a |
+ebtables-legacy-save: ebtables-save.in ${top_builddir}/config.status
|
|
|
05e71a |
${AM_V_GEN}sed -e 's![@]sbindir@!${sbindir}!g' <$< >$@
|
|
|
05e71a |
|
|
|
05e71a |
ebtables.sysv: ebtables.sysv.in ${top_builddir}/config.status
|
|
|
05e71a |
@@ -70,7 +71,7 @@ ebtables.sysv: ebtables.sysv.in ${top_builddir}/config.status
|
|
|
05e71a |
ebtables-config: ebtables-config.in ${top_builddir}/config.status
|
|
|
05e71a |
${AM_V_GEN}sed -e 's![@]sysconfigdir@!${sysconfigdir}!g' <$< >$@
|
|
|
05e71a |
|
|
|
05e71a |
-ebtables.8: ebtables.8.in ${top_builddir}/config.status
|
|
|
05e71a |
+ebtables-legacy.8: ebtables-legacy.8.in ${top_builddir}/config.status
|
|
|
05e71a |
${AM_V_GEN}sed -e 's![@]PACKAGE_VERSION!${PACKAGE_VERSION}!g' \
|
|
|
05e71a |
-e 's![@]PACKAGE_DATE@!${PROGDATE}!g' \
|
|
|
05e71a |
-e 's![@]LOCKFILE@!${LOCKFILE}!g' <$< >$@
|
|
|
05e71a |
diff --git a/ebtables.8.in b/ebtables-legacy.8.in
|
|
|
05e71a |
similarity index 98%
|
|
|
05e71a |
rename from ebtables.8.in
|
|
|
05e71a |
rename to ebtables-legacy.8.in
|
|
|
05e71a |
index 3e97c84da0e86..3417045fbd89d 100644
|
|
|
05e71a |
--- a/ebtables.8.in
|
|
|
05e71a |
+++ b/ebtables-legacy.8.in
|
|
|
05e71a |
@@ -24,7 +24,7 @@
|
|
|
05e71a |
.\"
|
|
|
05e71a |
.\"
|
|
|
05e71a |
.SH NAME
|
|
|
05e71a |
-ebtables (@PACKAGE_VERSION@) \- Ethernet bridge frame table administration
|
|
|
05e71a |
+ebtables-legacy (@PACKAGE_VERSION@) \- Ethernet bridge frame table administration (legacy)
|
|
|
05e71a |
.SH SYNOPSIS
|
|
|
05e71a |
.BR "ebtables " [ -t " table ] " - [ ACDI "] chain rule specification [match extensions] [watcher extensions] target"
|
|
|
05e71a |
.br
|
|
|
05e71a |
@@ -50,6 +50,18 @@ ebtables (@PACKAGE_VERSION@) \- Ethernet bridge frame table administration
|
|
|
05e71a |
.br
|
|
|
05e71a |
.BR "ebtables " [ -t " table ] [" --atomic-file " file] " --atomic-save
|
|
|
05e71a |
.br
|
|
|
05e71a |
+
|
|
|
05e71a |
+.SH LEGACY
|
|
|
05e71a |
+This tool uses the old xtables/setsockopt framework, and is a legacy version
|
|
|
05e71a |
+of ebtables. That means that a new, more modern tool exists with the same
|
|
|
05e71a |
+functionality using the nf_tables framework and you are encouraged to migrate now.
|
|
|
05e71a |
+The new binaries (known as ebtables-nft and formerly known as ebtables-compat)
|
|
|
05e71a |
+uses the same syntax and semantics than this legacy one.
|
|
|
05e71a |
+
|
|
|
05e71a |
+You can still use this legacy tool. You should probably get some specific
|
|
|
05e71a |
+information from your Linux distribution or vendor.
|
|
|
05e71a |
+More docs are available at https://wiki.nftables.org
|
|
|
05e71a |
+
|
|
|
05e71a |
.SH DESCRIPTION
|
|
|
05e71a |
.B ebtables
|
|
|
05e71a |
is an application program used to set up and maintain the
|
|
|
05e71a |
diff --git a/ebtables-save.in b/ebtables-save.in
|
|
|
05e71a |
index df141490c20b1..17924a2b8df90 100644
|
|
|
05e71a |
--- a/ebtables-save.in
|
|
|
05e71a |
+++ b/ebtables-save.in
|
|
|
05e71a |
@@ -50,7 +50,7 @@ sub process_table {
|
|
|
05e71a |
# ========================================================
|
|
|
05e71a |
|
|
|
05e71a |
unless (-x $ebtables) { exit -1 };
|
|
|
05e71a |
-print "# Generated by ebtables-save v$version on " . `date`;
|
|
|
05e71a |
+print "# Generated by ebtables-save v$version (legacy) on " . `date`;
|
|
|
05e71a |
if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") {
|
|
|
05e71a |
$cnt = "--Lc";
|
|
|
05e71a |
}
|
|
|
05e71a |
diff --git a/include/ebtables_u.h b/include/ebtables_u.h
|
|
|
05e71a |
index 7f5968dc6f39d..901b28233f140 100644
|
|
|
05e71a |
--- a/include/ebtables_u.h
|
|
|
05e71a |
+++ b/include/ebtables_u.h
|
|
|
05e71a |
@@ -395,7 +395,7 @@ extern int ebt_printstyle_mac;
|
|
|
05e71a |
#define BASE_CHAIN (hookmask & (1 << NF_BR_NUMHOOKS))
|
|
|
05e71a |
/* Clear the bit in the hook_mask that tells if the rule is on a base chain */
|
|
|
05e71a |
#define CLEAR_BASE_CHAIN_BIT (hookmask &= ~(1 << NF_BR_NUMHOOKS))
|
|
|
05e71a |
-#define PRINT_VERSION printf(PROGNAME" v"PROGVERSION" ("PROGDATE")\n")
|
|
|
05e71a |
+#define PRINT_VERSION printf(PROGNAME" v"PROGVERSION" (legacy) ("PROGDATE")\n")
|
|
|
05e71a |
#ifndef PROC_SYS_MODPROBE
|
|
|
05e71a |
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
|
|
|
05e71a |
#endif
|
|
|
05e71a |
--
|
|
|
05e71a |
2.21.0
|
|
|
05e71a |
|