From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SYzIN-0008A0-5p for ptxdist@pengutronix.de; Mon, 28 May 2012 14:44:01 +0200 Received: by wibhn6 with SMTP id hn6so1222302wib.7 for ; Mon, 28 May 2012 05:43:27 -0700 (PDT) From: "Bart vdr. Meulen" Date: Mon, 28 May 2012 14:42:45 +0200 Message-Id: <1338208981-8681-19-git-send-email-bartvdrmeulen@gmail.com> Subject: [ptxdist] [PATCH] arptables: Add new packege Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de From: "Bart vdr. Meulen" Add arptables, an administration tool for arp packet filtering Signed-off-by: Bart vdr. Meulen --- rules/arptables.in | 33 ++++++++++++++++++ rules/arptables.make | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 rules/arptables.in create mode 100644 rules/arptables.make diff --git a/rules/arptables.in b/rules/arptables.in new file mode 100644 index 0000000..565d831 --- /dev/null +++ b/rules/arptables.in @@ -0,0 +1,33 @@ +## SECTION=networking + +menuconfig ARPTABLES + tristate + prompt "arptables" + select KERNEL_HEADER + help + Arptables is used to set up, maintain, and inspect the tables of + ARP rules in the Linux kernel. It is analogous to iptables, + but operates at the ARP layer rather than the IP layer. + +if ARPTABLES + +config ARPTABLES_INSTALL_ARPTABLES + bool "install arptables" + help + install the arptables command + +config ARPTABLES_INSTALL_ARPTABLES_RESTORE + bool "install arptables-restore" + help + The arptables-restore command is used to restore + the arptables rule-set that was saved with the + arptables-save command. + +config ARPTABLES_INSTALL_ARPTABLES_SAVE + bool "install arptables-save" + help + The arptables-save command is a tool to save + the current rule-set into a file that + arptables-restore can use. + +endif diff --git a/rules/arptables.make b/rules/arptables.make new file mode 100644 index 0000000..97b06ed --- /dev/null +++ b/rules/arptables.make @@ -0,0 +1,90 @@ +# -*-makefile-*- +# +# Copyright (C) 2011 by Bart vdr. Meulen +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_ARPTABLES) += arptables + +# +# Paths and names +# +ARPTABLES_VERSION := 0.0.3-4 +ARPTABLES_MD5 := 1d4ab05761f063b0751645d8f2b8f8e5 +ARPTABLES := arptables-v$(ARPTABLES_VERSION) +ARPTABLES_SUFFIX := tar.gz +ARPTABLES_URL := $(PTXCONF_SETUP_SFMIRROR)/ebtables/arptables/arptables-v0.0.3/$(ARPTABLES).$(ARPTABLES_SUFFIX) +ARPTABLES_SOURCE := $(SRCDIR)/$(ARPTABLES).$(ARPTABLES_SUFFIX) +ARPTABLES_DIR := $(BUILDDIR)/$(ARPTABLES) +ARPTABLES_LICENSE := GPLv2 + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(ARPTABLES_SOURCE): + @$(call targetinfo) + @$(call get, ARPTABLES) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +ARPTABLES_CONF_TOOL := NO +ARPTABLES_MAKE_OPT := \ + $(CROSS_ENV_CFLAGS) \ + $(CROSS_ENV_CPPFLAGS) \ + $(CROSS_ENV_LDFLAGS) \ + $(CROSS_ENV_CC) \ + KERNEL_DIR=$(KERNEL_HEADERS_DIR) +ARPTABLES_INSTALL_OPT := \ + PREFIX=/usr install + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/arptables.targetinstall: + @$(call targetinfo) + + @$(call install_init, arptables) + @$(call install_fixup, arptables,PRIORITY,optional) + @$(call install_fixup, arptables,SECTION,base) + @$(call install_fixup, arptables,AUTHOR,"Bart vdr. Meulen ") + @$(call install_fixup, arptables,DESCRIPTION,missing) + +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES + @$(call install_copy, arptables, 0, 0, 0755, -, \ + /usr/sbin/arptables) +endif + +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_SAVE + @$(call install_copy, arptables, 0, 0, 0755, -, \ + /usr/sbin/arptables-save) +endif + +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_RESTORE + @$(call install_copy, arptables, 0, 0, 0755, -, \ + /usr/sbin/arptables-restore) +endif + + @$(call install_finish, arptables) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +#$(STATEDIR)/arptables.clean: +# @$(call targetinfo) +# @$(call clean_pkg, ARPTABLES) + +# vim: syntax=make -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de