aboutsummaryrefslogtreecommitdiffstats
path: root/package/parprouted
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-07-24 23:44:19 +0000
committerNicolas Thill <nico@openwrt.org>2005-07-24 23:44:19 +0000
commita3cc68488818de0d968ae26504fd8eddb2da4aa2 (patch)
tree760ca4b461269ef8679841cc2f3e4e0877648e6d /package/parprouted
parent8304dfdacebbabb05cf8301c66c4002c543e8888 (diff)
downloadupstream-a3cc68488818de0d968ae26504fd8eddb2da4aa2.tar.gz
upstream-a3cc68488818de0d968ae26504fd8eddb2da4aa2.tar.bz2
upstream-a3cc68488818de0d968ae26504fd8eddb2da4aa2.zip
add parprouted
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1542 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/parprouted')
-rw-r--r--package/parprouted/Config.in11
-rw-r--r--package/parprouted/Makefile42
-rwxr-xr-xpackage/parprouted/files/parprouted.default3
-rwxr-xr-xpackage/parprouted/files/parprouted.init16
-rw-r--r--package/parprouted/ipkg/parprouted.conffiles1
-rw-r--r--package/parprouted/ipkg/parprouted.control9
-rw-r--r--package/parprouted/patches/parprouted.patch33
7 files changed, 115 insertions, 0 deletions
diff --git a/package/parprouted/Config.in b/package/parprouted/Config.in
new file mode 100644
index 0000000000..16a8f2e359
--- /dev/null
+++ b/package/parprouted/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_PARPROUTED
+ tristate "parprouted - Proxy ARP daemon"
+# default m if CONFIG_DEVEL
+ default n
+ help
+ parprouted is a daemon for transparent IP (Layer 3) proxy ARP bridging.
+ This is useful for creation of transparent firewalls and bridging networks
+ with different MAC protocols. Also, unlike standard bridging, proxy ARP
+ bridging allows to bridge Ethernet networks behind wireless nodes without
+ using WDS or layer 2 bridging.
+
diff --git a/package/parprouted/Makefile b/package/parprouted/Makefile
new file mode 100644
index 0000000000..fc37e100fa
--- /dev/null
+++ b/package/parprouted/Makefile
@@ -0,0 +1,42 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=parprouted
+PKG_VERSION:=0.63
+PKG_RELEASE:=1
+PKG_MD5SUM:=12753098a22e82997d1941d6d2284750
+
+PKG_SOURCE_URL:=http://www.hazard.maks.net/parprouted/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(TOPDIR)/package/rules.mk
+
+$(eval $(call PKG_template,PARPROUTED,parprouted,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(PKG_BUILD_DIR)/.configured:
+ touch $@
+
+$(PKG_BUILD_DIR)/.built:
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+ all
+ touch $@
+
+$(IPKG_PARPROUTED):
+ install -d -m0755 $(IDIR_PARPROUTED)/etc/default
+ install -m0755 ./files/parprouted.default $(IDIR_PARPROUTED)/etc/default/parprouted
+ install -d -m0755 $(IDIR_PARPROUTED)/etc/init.d
+ install -m0755 ./files/parprouted.init $(IDIR_PARPROUTED)/etc/init.d/parprouted
+ ln -sf parprouted $(IDIR_PARPROUTED)/etc/init.d/S50parpouted
+ install -d -m0755 $(IDIR_PARPROUTED)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/parprouted $(IDIR_PARPROUTED)/usr/sbin/
+ $(RSTRIP) $(IDIR_PARPROUTED)
+ $(IPKG_BUILD) $(IDIR_PARPROUTED) $(PACKAGE_DIR)
+
+mostlyclean:
+ -$(MAKE) -C $(PKG_BUILD_DIR) clean
+ rm -f $(PKG_BUILD_DIR)/.built
diff --git a/package/parprouted/files/parprouted.default b/package/parprouted/files/parprouted.default
new file mode 100755
index 0000000000..17169c4b37
--- /dev/null
+++ b/package/parprouted/files/parprouted.default
@@ -0,0 +1,3 @@
+LAN_IF=$(nvram get lan_ifname)
+WIFI_IF=$(nvram get wifi_ifname)
+OPTIONS="$LAN_IF $WIFI_IF"
diff --git a/package/parprouted/files/parprouted.init b/package/parprouted/files/parprouted.init
new file mode 100755
index 0000000000..2422657ee8
--- /dev/null
+++ b/package/parprouted/files/parprouted.init
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+BIN=parprouted
+DEFAULT=/etc/default/$BIN
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ $BIN $OPTIONS
+ ;;
+ *)
+ echo "usage: $0 (start)"
+ exit 1
+esac
+
+exit $?
diff --git a/package/parprouted/ipkg/parprouted.conffiles b/package/parprouted/ipkg/parprouted.conffiles
new file mode 100644
index 0000000000..4446a8e997
--- /dev/null
+++ b/package/parprouted/ipkg/parprouted.conffiles
@@ -0,0 +1 @@
+/etc/default/parprouted
diff --git a/package/parprouted/ipkg/parprouted.control b/package/parprouted/ipkg/parprouted.control
new file mode 100644
index 0000000000..12bfd12558
--- /dev/null
+++ b/package/parprouted/ipkg/parprouted.control
@@ -0,0 +1,9 @@
+Package: parprouted
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
+Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/parprouted/
+Description: a proxy ARP daemon
+Depends: libpthread
diff --git a/package/parprouted/patches/parprouted.patch b/package/parprouted/patches/parprouted.patch
new file mode 100644
index 0000000000..17fbdecec7
--- /dev/null
+++ b/package/parprouted/patches/parprouted.patch
@@ -0,0 +1,33 @@
+diff -rupw parprouted-0.63/arp.c parprouted-0.63-1/arp.c
+--- parprouted-0.63/arp.c 2004-05-23 14:06:31.000000000 +0200
++++ parprouted-0.63-1/arp.c 2005-03-13 16:10:18.000000000 +0100
+@@ -366,7 +366,7 @@ void *arp(char *ifname)
+ do {
+ pthread_testcancel();
+ /* Sleep a bit in order not to overload the system */
+- usleep(300);
++ usleep(3000);
+
+ if (arp_recv(sock, &frame) <= 0)
+ continue;
+diff -rupw parprouted-0.63/parprouted.c parprouted-0.63-1/parprouted.c
+--- parprouted-0.63/parprouted.c 2004-01-30 02:45:43.000000000 +0100
++++ parprouted-0.63-1/parprouted.c 2005-03-20 09:14:35.000000000 +0100
+@@ -93,7 +93,7 @@ void processarp(int cleanup)
+
+ /* added route to the kernel */
+ if (snprintf(routecmd_str, ROUTE_CMD_LEN-1,
+- "/sbin/ip route add %s/32 metric 50 dev %s scope link",
++ "/sbin/route add -host %s metric 50 dev %s",
+ inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1)
+ {
+ syslog(LOG_INFO, "ip route command too large to fit in buffer!");
+@@ -112,7 +112,7 @@ void processarp(int cleanup)
+
+ /* remove entry from arp table and remove route from kernel */
+ if (snprintf(routecmd_str, ROUTE_CMD_LEN-1,
+- "/sbin/ip route del %s/32 metric 50 dev %s scope link",
++ "/sbin/route del -host %s metric 50 dev %s",
+ inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1)
+ {
+ syslog(LOG_INFO, "ip route command too large to fit in buffer!");