MT#55283 remove rtpengine-iptables package

Dropping support for handling this via the CLI means we don't need this
package any more

Change-Id: Ib13184018ca571f6d489491a04e7967de2542ac2
pull/1747/head
Richard Fuchs 2 years ago
parent 979a3c09ad
commit eea3824725

@ -24,7 +24,6 @@ ifeq ($(with_transcoding),yes)
$(MAKE) -C recording-daemon $(MAKE) -C recording-daemon
$(MAKE) -C perf-tester $(MAKE) -C perf-tester
endif endif
$(MAKE) -C iptables-extension
install: install:
$(MAKE) -C daemon install $(MAKE) -C daemon install
@ -32,7 +31,6 @@ ifeq ($(with_transcoding),yes)
$(MAKE) -C recording-daemon install $(MAKE) -C recording-daemon install
$(MAKE) -C perf-tester install $(MAKE) -C perf-tester install
endif endif
$(MAKE) -C iptables-extension install
mkdir -p $(DESTDIR)/usr/libexec/rtpengine/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1 mkdir -p $(DESTDIR)/usr/libexec/rtpengine/ $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
install -m 0755 utils/rtpengine-get-table $(DESTDIR)/usr/libexec/rtpengine/ install -m 0755 utils/rtpengine-get-table $(DESTDIR)/usr/libexec/rtpengine/
install -m 0755 utils/rtpengine-ctl utils/rtpengine-ng-client $(DESTDIR)/usr/bin/ install -m 0755 utils/rtpengine-ctl utils/rtpengine-ng-client $(DESTDIR)/usr/bin/
@ -57,7 +55,6 @@ distclean clean:
$(MAKE) -C daemon clean $(MAKE) -C daemon clean
$(MAKE) -C recording-daemon clean $(MAKE) -C recording-daemon clean
$(MAKE) -C perf-tester clean $(MAKE) -C perf-tester clean
$(MAKE) -C iptables-extension clean
$(MAKE) -C kernel-module clean $(MAKE) -C kernel-module clean
$(MAKE) -C t clean $(MAKE) -C t clean
@ -65,7 +62,6 @@ distclean clean:
$(MAKE) -C daemon $@ $(MAKE) -C daemon $@
$(MAKE) -C recording-daemon $@ $(MAKE) -C recording-daemon $@
$(MAKE) -C perf-tester $(MAKE) -C perf-tester
$(MAKE) -C iptables-extension $@
$(MAKE) -C kernel-module $@ $(MAKE) -C kernel-module $@
.PHONY: check asan-check .PHONY: check asan-check

1
debian/.gitignore vendored

@ -5,7 +5,6 @@
/debhelper-build-stamp /debhelper-build-stamp
/files /files
/ngcp-rtpengine-daemon/ /ngcp-rtpengine-daemon/
/ngcp-rtpengine-iptables/
/ngcp-rtpengine-kernel-dkms/ /ngcp-rtpengine-kernel-dkms/
/ngcp-rtpengine-kernel-source/ /ngcp-rtpengine-kernel-source/
/ngcp-rtpengine-perftest-data/ /ngcp-rtpengine-perftest-data/

10
debian/control vendored

@ -92,21 +92,11 @@ Depends:
Description: recording daemon for RTP and media streams Description: recording daemon for RTP and media streams
This daemon handles the call recording (media intercept) component of rtpengine. This daemon handles the call recording (media intercept) component of rtpengine.
Package: ngcp-rtpengine-iptables
Architecture: any
Multi-Arch: foreign
Depends:
${misc:Depends},
${shlibs:Depends},
Description: IPtables extension module for the kernel-space NGCP media proxy
Provides the IPtables extension needed to configure the mediaproxy rule.
Package: ngcp-rtpengine Package: ngcp-rtpengine
Architecture: all Architecture: all
Multi-Arch: foreign Multi-Arch: foreign
Depends: Depends:
ngcp-rtpengine-daemon (>= ${source:Version}), ngcp-rtpengine-daemon (>= ${source:Version}),
ngcp-rtpengine-iptables (>= ${source:Version}),
ngcp-rtpengine-kernel-dkms (>= ${source:Version}), ngcp-rtpengine-kernel-dkms (>= ${source:Version}),
ngcp-rtpengine-perftest (>= ${source:Version}), ngcp-rtpengine-perftest (>= ${source:Version}),
ngcp-rtpengine-recording-daemon (>= ${source:Version}), ngcp-rtpengine-recording-daemon (>= ${source:Version}),

@ -27,10 +27,6 @@ The generated files are (with version 6.2.0.0 being built on an amd64 system):
This installed the userspace daemon, which is the main workhorse of rtpengine. This is This installed the userspace daemon, which is the main workhorse of rtpengine. This is
the minimum requirement for anything to work. the minimum requirement for anything to work.
* `ngcp-rtpengine-iptables_6.2.0.0+0~mr6.2.0.0_amd64.deb`
Installs the plugin for `iptables` and `ip6tables`. Necessary for in-kernel operation.
* `ngcp-rtpengine-kernel-dkms_6.2.0.0+0~mr6.2.0.0_all.deb` * `ngcp-rtpengine-kernel-dkms_6.2.0.0+0~mr6.2.0.0_all.deb`
Kernel module, DKMS version of the package. Recommended for in-kernel operation. The kernel Kernel module, DKMS version of the package. Recommended for in-kernel operation. The kernel
@ -105,16 +101,6 @@ test suite.
Both `Makefile` switches can be provided to the `make` system via environment variables, for Both `Makefile` switches can be provided to the `make` system via environment variables, for
example by building with the shell command `with_transcoding=no make`. example by building with the shell command `with_transcoding=no make`.
* `iptables-extension`
Required for in-kernel packet forwarding.
With the `iptables` development headers installed, issuing `make` will compile the plugin for
`iptables` and `ip6tables`. The file will be called `libxt_RTPENGINE.so` and needs to be copied
into the `xtables` module directory. It is copied on `make install`. The location of this
directory can be determined through `pkg-config xtables --variable=xtlibdir` on newer systems,
and/or is usually either `/lib/xtables/` or `/usr/lib/x86_64-linux-gnu/xtables/`.
* `kernel-module` * `kernel-module`
Required for in-kernel packet forwarding. Supported for kernels versions 4.4 and newer. Required for in-kernel packet forwarding. Supported for kernels versions 4.4 and newer.

@ -95,16 +95,12 @@ and decodes them into an audio format that can be listened to.
%if 0%{?with_transcoding} > 0 %if 0%{?with_transcoding} > 0
cd daemon cd daemon
RTPENGINE_VERSION="\"%{version}-%{release}\"" make RTPENGINE_VERSION="\"%{version}-%{release}\"" make
cd ../iptables-extension
RTPENGINE_VERSION="\"%{version}-%{release}\"" make
cd ../recording-daemon cd ../recording-daemon
RTPENGINE_VERSION="\"%{version}-%{release}\"" make RTPENGINE_VERSION="\"%{version}-%{release}\"" make
cd .. cd ..
%else %else
cd daemon cd daemon
RTPENGINE_VERSION="\"%{version}-%{release}\"" make with_transcoding=no RTPENGINE_VERSION="\"%{version}-%{release}\"" make with_transcoding=no
cd ../iptables-extension
RTPENGINE_VERSION="\"%{version}-%{release}\"" make with_transcoding=no
cd .. cd ..
%endif %endif
@ -155,10 +151,6 @@ install -D -p -m644 etc/%{binname}-recording.conf \
%{buildroot}%{_sysconfdir}/%{binname}/%{binname}-recording.conf %{buildroot}%{_sysconfdir}/%{binname}/%{binname}-recording.conf
%endif %endif
# Install the iptables plugin
install -D -p -m755 iptables-extension/libxt_RTPENGINE.so \
%{buildroot}/%{_lib}/xtables/libxt_RTPENGINE.so
## DKMS module source install ## DKMS module source install
install -D -p -m644 kernel-module/Makefile \ install -D -p -m644 kernel-module/Makefile \
%{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/Makefile %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/Makefile

@ -1,73 +0,0 @@
CC?=gcc
CFLAGS ?= -O2 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes
CFLAGS += -shared -fPIC
ifneq ($(RTPENGINE_VERSION),)
CFLAGS += -DRTPENGINE_VERSION="\"$(RTPENGINE_VERSION)\""
else
DPKG_PRSCHNGLG= $(shell which dpkg-parsechangelog 2>/dev/null)
ifneq ($(DPKG_PRSCHNGLG),)
CFLAGS += -DRTPENGINE_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
else
CFLAGS += -DRTPENGINE_VERSION="\"undefined\""
endif
endif
XTABLES_INSTALLED=$(shell \
if pkg-config --exists xtables; then \
echo 'xtables found'; \
fi)
ifneq ($(XTABLES_INSTALLED),)
XTABLES = 1
CFLAGS += $(shell pkg-config --cflags --libs xtables)
else
XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
endif
IPTABLES = $(shell test -e /usr/include/iptables.h && echo 1)
IP6TABLES = $(shell test -e /usr/include/ip6tables.h && echo 1)
WORK=0
.PHONY: all module clean install
all: module
ifeq ($(XTABLES),1)
WORK=1
module: libxt_RTPENGINE.so
XTABLES_DIR ?= $(shell pkg-config xtables --variable=xtlibdir || echo /lib/xtables)
libxt_RTPENGINE.so: libxt_RTPENGINE.c
$(CC) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c
else
ifeq ($(IPTABLES),1)
WORK=1
module: libipt_RTPENGINE.so
endif
ifeq ($(IP6TABLES),1)
WORK=1
module: libip6t_RTPENGINE.so
endif
libipt_RTPENGINE.so: libxt_RTPENGINE.c
$(CC) $(CFLAGS) -D__ipt -o libipt_RTPENGINE.so libxt_RTPENGINE.c
libip6t_RTPENGINE.so: libxt_RTPENGINE.c
$(CC) $(CFLAGS) -D__ip6t -o libip6t_RTPENGINE.so libxt_RTPENGINE.c
endif
ifeq ($(WORK),0)
module:
@echo No iptables dev packages installed!
endif
clean:
rm -f libxt_RTPENGINE.so libipt_RTPENGINE.so libip6t_RTPENGINE.so
install:
install -D libxt_RTPENGINE.so $(DESTDIR)$(XTABLES_DIR)/libxt_RTPENGINE.so

@ -1,183 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifndef _init
#define _init __attribute__((constructor)) _INIT
#endif
#if defined(__ipt)
#include <iptables.h>
#elif defined(__ip6t)
#include <ip6tables.h>
#else
#include <xtables.h>
#endif
#include <linux/netfilter.h>
#if defined(__ipt)
#include <linux/netfilter_ipv4/ip_tables.h>
#elif defined(__ip6t)
#include <linux/netfilter_ipv6/ip6_tables.h>
#else
#include <linux/netfilter/x_tables.h>
#endif
#include "../kernel-module/xt_RTPENGINE.h"
static void help(void) {
printf(
"RTPENGINE (version %s) target options:\n"
" --id <id>\n"
" Unique ID for this instance\n",
RTPENGINE_VERSION
);
}
#if defined(__ipt)
static int parse(int c,
char **argv,
int invert,
unsigned int *flags,
const struct ipt_entry *entry,
struct ipt_entry_target **target) {
#elif defined(__ip6t)
static int parse(int c,
char **argv,
int invert,
unsigned int *flags,
const struct ip6t_entry *entry,
struct ip6t_entry_target **target) {
#else
static int parse(int c,
char **argv,
int invert,
unsigned int *flags,
const void *entry,
struct xt_entry_target **target) {
#endif
struct xt_rtpengine_info *info = (void *) (*target)->data;
if (c == '1') {
info->id = atoi(optarg);
if (flags)
*flags = 1;
}
else
return 0;
return 1;
}
static void final_check(unsigned int flags) {
#if defined(__ipt) || defined(__ip6t)
if (!flags)
exit_error(PARAMETER_PROBLEM, "You must specify --id");
#else
if (!flags)
xtables_error(PARAMETER_PROBLEM, "You must specify --id");
#endif
}
#if defined(__ipt)
static void print(const struct ipt_ip *ip, const struct xt_entry_target *target, int numeric) {
#elif defined(__ip6t)
static void print(const struct ip6t_ip6 *ip, const struct xt_entry_target *target, int numeric) {
#else
static void print(const void *ip, const struct xt_entry_target *target, int numeric) {
#endif
struct xt_rtpengine_info *info = (void *) target->data;
printf(" RTPENGINE id:%u", info->id);
}
#if defined(__ipt)
static void save(const struct ipt_ip *ip, const struct xt_entry_target *target) {
#elif defined(__ip6t)
static void save(const struct ip6t_ip6 *ip, const struct xt_entry_target *target) {
#else
static void save(const void *ip, const struct xt_entry_target *target) {
#endif
struct xt_rtpengine_info *info = (void *) target->data;
printf(" --id %u", info->id);
}
static struct option opts[] = {
{ "id", 1, NULL, '1' },
{ NULL, },
};
#if defined(__ipt)
static struct iptables_target rtpengine4 = {
.name = "RTPENGINE",
.version = "1.3.6",
.size = IPT_ALIGN(sizeof(struct xt_rtpengine_info)),
.userspacesize = IPT_ALIGN(sizeof(struct xt_rtpengine_info)),
.help = help,
.parse = parse,
.final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
};
#elif defined(__ip6t)
static struct ip6tables_target rtpengine6 = {
.name = "RTPENGINE",
.version = "1.3.6",
.size = IP6T_ALIGN(sizeof(struct xt_rtpengine_info)),
.userspacesize = IP6T_ALIGN(sizeof(struct xt_rtpengine_info)),
.help = help,
.parse = parse,
.final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
};
#else
static struct xtables_target rtpengine4 = {
.name = "RTPENGINE",
.family = NFPROTO_IPV4,
.version = XTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_rtpengine_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_rtpengine_info)),
.help = help,
.parse = parse,
.final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
};
static struct xtables_target rtpengine6 = {
.name = "RTPENGINE",
.family = NFPROTO_IPV6,
.version = XTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_rtpengine_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_rtpengine_info)),
.help = help,
.parse = parse,
.final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
};
#endif
void _init(void) {
#if defined(__ipt)
register_target(&rtpengine4);
#elif defined(__ip6t)
register_target6(&rtpengine6);
#else
xtables_register_target(&rtpengine4);
xtables_register_target(&rtpengine6);
#endif
}

@ -60,18 +60,6 @@ sed -i 's;^override_dh_auto_install-indep:;override_dh_auto_install-indep:\
\tsed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf\ \tsed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf\
;' "${DIST}"/rules ;' "${DIST}"/rules
# Fix module installation location
rm ${DIST}/rtpengine-iptables.dirs
rm ${DIST}/rtpengine-iptables.install
cat >> ${DIST}/rules <<'EOF'
override_dh_install:
dh_install
dh_installdirs -prtpengine-iptables $(XTABLES_DIR)
rm -f debian/tmp/$(XTABLES_DIR)/libxt_RTPENGINE.so
install -m 0644 iptables-extension/libxt_RTPENGINE.so debian/rtpengine-iptables/$(XTABLES_DIR)
EOF
if command -v wrap-and-sort &>/dev/null ; then if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST} wrap-and-sort -sat -d ${DIST}
else else

@ -59,18 +59,6 @@ sed -i 's;^override_dh_auto_install-indep:;override_dh_auto_install-indep:\
\tsed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf\ \tsed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf\
;' "${DIST}"/rules ;' "${DIST}"/rules
# Fix module installation location
rm ${DIST}/rtpengine-iptables.dirs
rm ${DIST}/rtpengine-iptables.install
cat >> ${DIST}/rules <<'EOF'
override_dh_install:
dh_install
dh_installdirs -prtpengine-iptables $(XTABLES_DIR)
rm -f debian/tmp/$(XTABLES_DIR)/libxt_RTPENGINE.so
install -m 0644 iptables-extension/libxt_RTPENGINE.so debian/rtpengine-iptables/$(XTABLES_DIR)
EOF
if command -v wrap-and-sort &>/dev/null ; then if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST} wrap-and-sort -sat -d ${DIST}
else else

Loading…
Cancel
Save