From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/parprouted/Config.in | 13 ++++++++++++ package/parprouted/Makefile | 30 ++++++++++++++++++++++++++ package/parprouted/files/parprouted.default | 1 + package/parprouted/files/parprouted.init | 26 +++++++++++++++++++++++ package/parprouted/ipkg/parprouted.control | 5 +++++ package/parprouted/ipkg/parprouted.postinst | 4 ++++ package/parprouted/patches/parprouted.patch | 33 +++++++++++++++++++++++++++++ 7 files changed, 112 insertions(+) create mode 100644 package/parprouted/Config.in create mode 100644 package/parprouted/Makefile create mode 100755 package/parprouted/files/parprouted.default create mode 100644 package/parprouted/files/parprouted.init create mode 100644 package/parprouted/ipkg/parprouted.control create mode 100644 package/parprouted/ipkg/parprouted.postinst create mode 100644 package/parprouted/patches/parprouted.patch (limited to 'package/parprouted') diff --git a/package/parprouted/Config.in b/package/parprouted/Config.in new file mode 100644 index 000000000..af1474e47 --- /dev/null +++ b/package/parprouted/Config.in @@ -0,0 +1,13 @@ +config ADK_PACKAGE_PARPROUTED + prompt "parprouted........................ Proxy ARP daemon" + tristate + 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. + + http://www.hazard.maks.net/ + diff --git a/package/parprouted/Makefile b/package/parprouted/Makefile new file mode 100644 index 000000000..dcd33c8cc --- /dev/null +++ b/package/parprouted/Makefile @@ -0,0 +1,30 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= parprouted +PKG_VERSION:= 0.63 +PKG_RELEASE:= 9 +PKG_MD5SUM:= 12753098a22e82997d1941d6d2284750 +MASTER_SITES:= http://www.hazard.maks.net/parprouted/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,PARPROUTED,parprouted,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +BUILD_STYLE:= auto +MAKE_FLAGS+= CC="${TARGET_CC}" \ + CFLAGS="${TCFLAGS}" \ + LDFLAGS="" + +do-install: + ${INSTALL_DIR} ${IDIR_PARPROUTED}/etc/init.d + ${INSTALL_DIR} ${IDIR_PARPROUTED}/usr/sbin + ${INSTALL_BIN} ./files/parprouted.init \ + ${IDIR_PARPROUTED}/etc/init.d/parprouted + ${INSTALL_BIN} ${WRKBUILD}/parprouted ${IDIR_PARPROUTED}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/parprouted/files/parprouted.default b/package/parprouted/files/parprouted.default new file mode 100755 index 000000000..7128a56a7 --- /dev/null +++ b/package/parprouted/files/parprouted.default @@ -0,0 +1 @@ +OPTIONS="$lan_ifname $wifi_ifname" diff --git a/package/parprouted/files/parprouted.init b/package/parprouted/files/parprouted.init new file mode 100644 index 000000000..248fdd5e5 --- /dev/null +++ b/package/parprouted/files/parprouted.init @@ -0,0 +1,26 @@ +#!/bin/sh +#FWINIT 75 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${parprouted:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + parprouted ${parprouted_flags} + ;; +stop) + killall parprouted + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/parprouted/ipkg/parprouted.control b/package/parprouted/ipkg/parprouted.control new file mode 100644 index 000000000..9357ae586 --- /dev/null +++ b/package/parprouted/ipkg/parprouted.control @@ -0,0 +1,5 @@ +Package: parprouted +Priority: optional +Section: net +Description: a proxy ARP daemon +Depends: libpthread diff --git a/package/parprouted/ipkg/parprouted.postinst b/package/parprouted/ipkg/parprouted.postinst new file mode 100644 index 000000000..5943ccc96 --- /dev/null +++ b/package/parprouted/ipkg/parprouted.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf parprouted parprouted NO +add_rcconf parprouted_flags parprouted_flags "eth0.1 eth1" diff --git a/package/parprouted/patches/parprouted.patch b/package/parprouted/patches/parprouted.patch new file mode 100644 index 000000000..17fbdecec --- /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!"); -- cgit v1.2.3