From: jow Date: Thu, 2 Feb 2012 10:01:49 +0000 (+0000) Subject: ndppd: initial import (release 0.2.1) X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=2091be2585b87658eb096eb896f289b87f3a6d5d;hp=8c51b40c1e50cf96905eebb45cb363122afab955;p=packages.git ndppd: initial import (release 0.2.1) Hi, here is a patch to add a package for ndppd: ndppd, or NDP Proxy Daemon, is a daemon that proxies NDP (Neighbor Discovery Protocol) messages between interfaces. ndppd currently only supports Neighbor Solicitation Messages and Neighbor Advertisement Messages. The ndp_proxy provided by Linux doesn't support listing proxies, and only hosts are supported. No subnets. ndppd solves this by listening for Neighbor Solicitation messages on an interface, then query the internal interfaces for that target IP before finally sending a Neighbor Advertisement message. http://www.priv.nu/projects/ndppd/ I tested it and it works fine. I am willing to maintain it. Note that this my first C++ package and it took a lot of trial and error to get the Build/Compile target working. Any feedback would be much welcome. Best regard, >From 689b4a52af2e25e3574d0dca7cc5e63ed100c50a Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Fri, 27 Jan 2012 15:35:14 +0100 Subject: [PATCH] [packages] ndppd: initial import (release 0.2.1) git-svn-id: svn://svn.openwrt.org/openwrt/packages@29987 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/ipv6/ndppd/Makefile b/ipv6/ndppd/Makefile new file mode 100644 index 000000000..08ccc76ec --- /dev/null +++ b/ipv6/ndppd/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ndppd +PKG_VERSION:=0.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.priv.nu/projects/ndppd/files/ +PKG_MD5SUM:=9b65a8cccfce8689f0c1c410c20b4790 + +include $(INCLUDE_DIR)/package.mk + +define Package/ndppd + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=NDP Proxy Daemon + URL:=http://www.priv.nu/projects/ndppd/ + MAINTAINER:=Gabriel Kerneis + DEPENDS:=+kmod-ipv6 +confuse +uclibcxx +endef + +define Package/ndppd/description + ndppd, or NDP Proxy Daemon, is a daemon that proxies NDP (Neighbor Discovery + Protocol) messages between interfaces. ndppd currently only supports Neighbor + Solicitation Messages and Neighbor Advertisement Messages. + + The ndp_proxy provided by Linux doesn't support listing proxies, and only hosts + are supported. No subnets. ndppd solves this by listening for Neighbor + Solicitation messages on an interface, then query the internal interfaces for + that target IP before finally sending a Neighbor Advertisement message. +endef + +define Package/ndppd/conffiles +/etc/ndppd.conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CXX="$(TARGET_CXX)" \ + CXXFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS) -fno-builtin -fno-rtti -nostdinc++ \ + -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + LIBS="-nodefaultlibs -luClibc++ -lconfuse" \ + ndppd +endef + +define Package/ndppd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndppd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ndppd.init $(1)/etc/init.d/ndppd + $(INSTALL_CONF) $(PKG_BUILD_DIR)/ndppd.conf-dist $(1)/etc/ndppd.conf +endef + +$(eval $(call BuildPackage,ndppd)) diff --git a/ipv6/ndppd/files/ndppd.init b/ipv6/ndppd/files/ndppd.init new file mode 100644 index 000000000..4cf0e8a3a --- /dev/null +++ b/ipv6/ndppd/files/ndppd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2011 OpenWrt.org + +START=90 + +SERVICE_USE_PID=1 +SERVICE_PID_FILE=/var/run/ndppd.pid + +start() { + mkdir -p /var/run + service_start /usr/sbin/ndppd -p $SERVICE_PID_FILE -d +} + +stop() { + service_stop /usr/sbin/ndppd +}