From 223314901eeefe3b4abdddf9d87ef817b9daccd3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 2 Feb 2012 10:01:49 +0000 Subject: [PATCH 1/7] 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/ipv6/ndppd@29987 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ files/ndppd.init | 16 +++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Makefile create mode 100644 files/ndppd.init diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..08ccc76 --- /dev/null +++ b/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/files/ndppd.init b/files/ndppd.init new file mode 100644 index 0000000..4cf0e8a --- /dev/null +++ b/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 +} From 6d9594238984c592fe706f7c2b1d57edb38fe14f Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Tue, 14 Feb 2012 17:34:08 +0000 Subject: [PATCH 2/7] [packages] Mass Fix for GCC 4.6 nodefaultlibs now includes libc so we have to add it where we want it git-svn-id: svn://svn.openwrt.org/openwrt/packages/ipv6/ndppd@30530 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 08ccc76..270f84b 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ define Build/Compile 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" \ + LIBS="-nodefaultlibs -lc -luClibc++ -lconfuse" \ ndppd endef From 3851147cb5c08494a911ec5afbe8f916bc0de5ba Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Wed, 15 Feb 2012 09:34:08 +0000 Subject: [PATCH 3/7] [packages] more gcc 4.6 compilation fixes git-svn-id: svn://svn.openwrt.org/openwrt/packages/ipv6/ndppd@30548 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 270f84b..1750d24 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ define Build/Compile 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 -lc -luClibc++ -lconfuse" \ + LIBS="-nodefaultlibs -lc -luClibc++ -lconfuse $(LIBGCC_S)" \ ndppd endef From 676138daf49a2281c0ba6f637c118c1253dd0035 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Thu, 16 Feb 2012 11:58:30 +0000 Subject: [PATCH 4/7] ndppd: new upstream release 0.2.2 New features in 0.2.2: - libconfuse dependency removed - Improved logging - New auto-configuration option Signed-off-by: Gabriel Kerneis git-svn-id: svn://svn.openwrt.org/openwrt/packages/ipv6/ndppd@30580 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1750d24..7d37384 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2007-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -8,12 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ndppd -PKG_VERSION:=0.2.1 +PKG_VERSION:=0.2.2 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +# Latest release PKG_SOURCE_URL:=http://www.priv.nu/projects/ndppd/files/ -PKG_MD5SUM:=9b65a8cccfce8689f0c1c410c20b4790 +PKG_MD5SUM:=d90c4b65777a62274c1837dba341e5a8 + +# Development snapshot +#PKG_SOURCE_URL=git://github.com/Tuhox/ndppd.git +#PKG_SOURCE_VERSION=master +#PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -23,7 +30,7 @@ define Package/ndppd TITLE:=NDP Proxy Daemon URL:=http://www.priv.nu/projects/ndppd/ MAINTAINER:=Gabriel Kerneis - DEPENDS:=+kmod-ipv6 +confuse +uclibcxx + DEPENDS:=+kmod-ipv6 +uclibcxx endef define Package/ndppd/description @@ -44,10 +51,11 @@ 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" \ + CXXFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS) $(TARGET_CFLAGS) \ + -std=c++0x -fno-builtin -fno-rtti -nostdinc++ \ + -I$(STAGING_DIR)/usr/include/uClibc++" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - LIBS="-nodefaultlibs -lc -luClibc++ -lconfuse $(LIBGCC_S)" \ + LIBS="-nodefaultlibs -lc -luClibc++ $(LIBGCC_S)" \ ndppd endef From 15e66113f87f3fb0927f9418828dd54958100dd1 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 4 Aug 2012 17:02:17 +0000 Subject: [PATCH 5/7] [packages] ndppd libc++ fix git-svn-id: svn://svn.openwrt.org/openwrt/packages/ipv6/ndppd@32985 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7d37384..8ffcacb 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ndppd PKG_VERSION:=0.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -22,6 +22,7 @@ PKG_MD5SUM:=d90c4b65777a62274c1837dba341e5a8 #PKG_SOURCE_VERSION=master #PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ndppd @@ -30,7 +31,7 @@ define Package/ndppd TITLE:=NDP Proxy Daemon URL:=http://www.priv.nu/projects/ndppd/ MAINTAINER:=Gabriel Kerneis - DEPENDS:=+kmod-ipv6 +uclibcxx + DEPENDS:=+kmod-ipv6 $(CXX_DEPENDS) endef define Package/ndppd/description @@ -51,11 +52,9 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CXX="$(TARGET_CXX)" \ - CXXFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS) $(TARGET_CFLAGS) \ - -std=c++0x -fno-builtin -fno-rtti -nostdinc++ \ - -I$(STAGING_DIR)/usr/include/uClibc++" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++0x -fno-rtti" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - LIBS="-nodefaultlibs -lc -luClibc++ $(LIBGCC_S)" \ + LIBS="-lc" \ ndppd endef From 95b7ebc00a188cd0177df351dbbde78668c85f52 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 14 May 2013 15:02:57 +0000 Subject: [PATCH 6/7] packages: fold the IPv6 menu into Network Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/packages/ipv6/ndppd@36635 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8ffcacb..b7c3282 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ndppd - SECTION:=ipv6 - CATEGORY:=IPv6 + SECTION:=net + CATEGORY:=Network TITLE:=NDP Proxy Daemon URL:=http://www.priv.nu/projects/ndppd/ MAINTAINER:=Gabriel Kerneis From 1fb0f3bcfeaafbd1631e769837fb26e3c86669cf Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Mon, 1 Jul 2013 15:35:57 +0200 Subject: [PATCH 7/7] Move files to ndppd folder for import in openwrt-routing feed --- Makefile => ndppd/Makefile | 0 {files => ndppd/files}/ndppd.init | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Makefile => ndppd/Makefile (100%) rename {files => ndppd/files}/ndppd.init (100%) diff --git a/Makefile b/ndppd/Makefile similarity index 100% rename from Makefile rename to ndppd/Makefile diff --git a/files/ndppd.init b/ndppd/files/ndppd.init similarity index 100% rename from files/ndppd.init rename to ndppd/files/ndppd.init