From 8de00a217253eb9a249eec5210177e6d2bdb0557 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 8 Apr 2015 08:49:11 +0200 Subject: [PATCH 1/1] Remove libiptc things --- Makefile.am | 57 ------------------------------ configure.ac | 16 --------- src/shared/fw-util.h | 82 -------------------------------------------- 3 files changed, 155 deletions(-) delete mode 100644 src/shared/fw-util.h diff --git a/Makefile.am b/Makefile.am index 135e7b35c..178319d88 100644 --- a/Makefile.am +++ b/Makefile.am @@ -965,24 +965,6 @@ libsystemd_label_la_LIBADD = \ # ----------------------------------------------------------------------------- -if HAVE_LIBIPTC -noinst_LTLIBRARIES += \ - libsystemd-fw.la - -libsystemd_fw_la_SOURCES = \ - src/shared/fw-util.h \ - src/shared/fw-util.c - -libsystemd_fw_la_CFLAGS = \ - $(AM_CFLAGS) \ - $(LIBIPTC_CFLAGS) - -libsystemd_fw_la_LIBADD = \ - $(LIBIPTC_LIBS) -endif - -# ----------------------------------------------------------------------------- - if ENABLE_LDCONFIG dist_systemunit_DATA += \ units/ldconfig.service @@ -1332,11 +1314,6 @@ manual_tests += \ test-ipcrm \ test-btrfs -if HAVE_LIBIPTC -manual_tests += \ - test-fw-util -endif - if HAVE_KMOD manual_tests += \ test-rtnl-manual @@ -1813,20 +1790,6 @@ test_btrfs_LDADD = \ libsystemd-label.la \ libsystemd-shared.la -if HAVE_LIBIPTC -test_fw_util_SOURCES = \ - src/test/test-fw-util.c - -test_fw_util_CFLAGS = \ - $(AM_CFLAGS) \ - $(LIBIPTC_CFLAGS) - -test_fw_util_LDADD = \ - libsystemd-fw.la \ - libsystemd-shared.la \ - $(LIBIPTC_LIBS) -endif - test_rtnl_manual_SOURCES = \ src/test/test-rtnl-manual.c @@ -2771,11 +2734,6 @@ systemd_nspawn_LDADD += \ $(SECCOMP_LIBS) endif -if HAVE_LIBIPTC -systemd_nspawn_LDADD += \ - libsystemd-fw.la -endif - # ------------------------------------------------------------------------------ systemd_run_SOURCES = \ src/run/run.c @@ -5649,11 +5607,6 @@ systemd_networkd_SOURCES = \ systemd_networkd_LDADD = \ libsystemd-networkd-core.la -if HAVE_LIBIPTC -systemd_networkd_LDADD += \ - libsystemd-fw.la -endif - noinst_LTLIBRARIES += \ libsystemd-networkd-core.la @@ -5749,11 +5702,6 @@ test_network_SOURCES = \ test_network_LDADD = \ libsystemd-networkd-core.la -if HAVE_LIBIPTC -test_network_LDADD += \ - libsystemd-fw.la -endif - test_network_tables_SOURCES = \ src/network/test-network-tables.c \ src/shared/test-tables.h @@ -5762,11 +5710,6 @@ test_network_tables_LDADD = \ libsystemd-networkd-core.la \ libudev-core.la -if HAVE_LIBIPTC -test_network_tables_LDADD += \ - libsystemd-fw.la -endif - tests += \ test-network \ test-network-tables diff --git a/configure.ac b/configure.ac index 8144bdb34..f0b9963b3 100644 --- a/configure.ac +++ b/configure.ac @@ -891,21 +891,6 @@ if test "x$enable_libidn" != "xno"; then fi AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"]) -# ------------------------------------------------------------------------------ -have_libiptc=no -AC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support])) -if test "x$enable_libiptc" != "xno"; then - PKG_CHECK_MODULES(LIBIPTC, [libiptc], - [AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available]) - have_libiptc=yes - M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"], - [have_libiptc=no]) - if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then - AC_MSG_ERROR([*** libiptc support requested but libraries not found]) - fi -fi -AM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"]) - # ------------------------------------------------------------------------------ have_binfmt=no AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) @@ -1492,7 +1477,6 @@ AC_MSG_RESULT([ GNUTLS: ${have_gnutls} libcurl: ${have_libcurl} libidn: ${have_libidn} - libiptc: ${have_libiptc} ELFUTILS: ${have_elfutils} binfmt: ${have_binfmt} vconsole: ${have_vconsole} diff --git a/src/shared/fw-util.h b/src/shared/fw-util.h deleted file mode 100644 index 93152e397..000000000 --- a/src/shared/fw-util.h +++ /dev/null @@ -1,82 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -#pragma once - -/*** - This file is part of systemd. - - Copyright 2015 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see . -***/ - -#include "in-addr-util.h" - -#ifdef HAVE_LIBIPTC - -int fw_add_masquerade( - bool add, - int af, - int protocol, - const union in_addr_union *source, - unsigned source_prefixlen, - const char *out_interface, - const union in_addr_union *destination, - unsigned destination_prefixlen); - -int fw_add_local_dnat( - bool add, - int af, - int protocol, - const char *in_interface, - const union in_addr_union *source, - unsigned source_prefixlen, - const union in_addr_union *destination, - unsigned destination_prefixlen, - uint16_t local_port, - const union in_addr_union *remote, - uint16_t remote_port, - const union in_addr_union *previous_remote); - -#else - -static inline int fw_add_masquerade( - bool add, - int af, - int protocol, - const union in_addr_union *source, - unsigned source_prefixlen, - const char *out_interface, - const union in_addr_union *destination, - unsigned destination_prefixlen) { - return -EOPNOTSUPP; -} - -static inline int fw_add_local_dnat( - bool add, - int af, - int protocol, - const char *in_interface, - const union in_addr_union *source, - unsigned source_prefixlen, - const union in_addr_union *destination, - unsigned destination_prefixlen, - uint16_t local_port, - const union in_addr_union *remote, - uint16_t remote_port, - const union in_addr_union *previous_remote) { - return -EOPNOTSUPP; -} - -#endif -- 2.30.2