From e02e8ce2e17dcb9fd94544fd99c3ca9fca730d39 Mon Sep 17 00:00:00 2001 From: cyrus Date: Fri, 14 Mar 2014 08:23:27 +0000 Subject: [PATCH] mrd6: adopted in openwrt-routing git-svn-id: svn://svn.openwrt.org/openwrt/packages@39924 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ipv6/mrd6/Makefile | 75 ------------------------ ipv6/mrd6/files/mrd6.conf | 14 ----- ipv6/mrd6/files/mrd6.init | 13 ---- ipv6/mrd6/patches/001-add_missing_include.patch | 10 ---- ipv6/mrd6/patches/002-missing_netlink_defs.patch | 58 ------------------ ipv6/mrd6/patches/003-debian.patch | 71 ---------------------- ipv6/mrd6/patches/004-ambiguous_call_fix.patch | 13 ---- 7 files changed, 254 deletions(-) delete mode 100644 ipv6/mrd6/Makefile delete mode 100644 ipv6/mrd6/files/mrd6.conf delete mode 100644 ipv6/mrd6/files/mrd6.init delete mode 100644 ipv6/mrd6/patches/001-add_missing_include.patch delete mode 100644 ipv6/mrd6/patches/002-missing_netlink_defs.patch delete mode 100644 ipv6/mrd6/patches/003-debian.patch delete mode 100644 ipv6/mrd6/patches/004-ambiguous_call_fix.patch diff --git a/ipv6/mrd6/Makefile b/ipv6/mrd6/Makefile deleted file mode 100644 index 00d8d9a1b..000000000 --- a/ipv6/mrd6/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2006-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:=mrd6 -PKG_VERSION:=0.9.6 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mrd6/ -PKG_MD5SUM:=a59d87857654ff92426062ad5664fcd6 - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/mrd6 - SECTION:=net - CATEGORY:=Network - TITLE:=IPv6 multicast routing daemon - URL:=http://fivebits.net/proj/mrd6 - DEPENDS:=+kmod-ipv6 +libstdcpp -endef - -define Package/mrd6/description - Multicast is becoming a major component in next generation networks, used - in several scenarios, from video broadcasting to multimedia conferencing. - In order to be implemented, new technology needs supporting hardware and - software across a set of devices and systems. MRD6 is an implementation of - a modular IPv6 Multicast Routing Framework for the Linux operating system - and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support. -endef - -MRD6_MAKEFLAGS:= \ - $(TARGET_CONFIGURE_OPTS) \ - OPTIMIZE=yes \ - SPACE_OPTIMIZE=yes \ - FULL_STATIC=no \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DNO_INET6_OPTION -fno-builtin -fno-rtti" \ - LDFLAGS="$(TARGET_LDFLAGS) -ldl -lm" \ - MODULE_CXX="\$$$$(CC) -shared \$$$$(CXXFLAGS) \$$$$(LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - PREFIX="/usr" - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) all -endef - -define Build/Install - $(MAKE) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) install -endef - -define Package/mrd6/conffiles -/etc/mrd6.conf -endef - -define Package/mrd6/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_CONF) ./files/mrd6.conf $(1)/etc - $(INSTALL_BIN) ./files/mrd6.init $(1)/etc/init.d/mrd6 - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mrd $(1)/usr/sbin/mrd6 - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mrd6sh $(1)/usr/bin/mrd6sh - $(INSTALL_DIR) $(1)/usr/lib/mrd6 - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mrd6/bgp.so $(1)/usr/lib/mrd6/bgp.so -endef - -$(eval $(call BuildPackage,mrd6)) diff --git a/ipv6/mrd6/files/mrd6.conf b/ipv6/mrd6/files/mrd6.conf deleted file mode 100644 index 283ebd497..000000000 --- a/ipv6/mrd6/files/mrd6.conf +++ /dev/null @@ -1,14 +0,0 @@ -log { - attach stderr normal; - attach default "/var/log/mrd6.log" message_err; -} - -interfaces disable br-lan; // Should be vlan0 + eth1 but Linux bridge seems broken for multicast -interfaces disable eth0; // Interface to internal bridge -handle-proper-bridge = true; // use ETH_P_ALL to see all packets on wrt54g - -// The default configured RP is m6bone's Renater RP. -// Change this according to your setup - -groups ff00::/8 pim rp = 2001:660:3007:300:1::; - diff --git a/ipv6/mrd6/files/mrd6.init b/ipv6/mrd6/files/mrd6.init deleted file mode 100644 index 24818407f..000000000 --- a/ipv6/mrd6/files/mrd6.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 - -start() { - service_start /usr/sbin/mrd6 -f /etc/mrd6.conf -D -} - -stop() { - service_stop /usr/sbin/mrd6 -} - diff --git a/ipv6/mrd6/patches/001-add_missing_include.patch b/ipv6/mrd6/patches/001-add_missing_include.patch deleted file mode 100644 index 5501909b5..000000000 --- a/ipv6/mrd6/patches/001-add_missing_include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/mrd/support/ptree.h -+++ b/include/mrd/support/ptree.h -@@ -35,6 +35,7 @@ - #ifndef _Ptree_h_ - #define _Ptree_h_ - -+#include - #include - #include - #include diff --git a/ipv6/mrd6/patches/002-missing_netlink_defs.patch b/ipv6/mrd6/patches/002-missing_netlink_defs.patch deleted file mode 100644 index 28ab71151..000000000 --- a/ipv6/mrd6/patches/002-missing_netlink_defs.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 2007-09-21 13:19:06.000000000 +0200 -@@ -0,0 +1,41 @@ -+#include -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) -+ -+#include -+#include -+#include -+ -+#ifndef IFA_RTA -+#define IFA_RTA(r) \ -+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) -+#endif -+#ifndef IFA_PAYLOAD -+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) -+#endif -+ -+#ifndef IFLA_RTA -+#define IFLA_RTA(r) \ -+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) -+#endif -+#ifndef IFLA_PAYLOAD -+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) -+#endif -+ -+#ifndef NDA_RTA -+#define NDA_RTA(r) \ -+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg)))) -+#endif -+#ifndef NDA_PAYLOAD -+#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg)) -+#endif -+ -+#ifndef NDTA_RTA -+#define NDTA_RTA(r) \ -+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg)))) -+#endif -+#ifndef NDTA_PAYLOAD -+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg)) -+#endif -+ -+#endif -Index: mrd6-0.9.5/src/linux/linux_unicast_route.cpp -=================================================================== ---- mrd6-0.9.5.orig/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:05.000000000 +0200 -+++ mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:06.000000000 +0200 -@@ -23,6 +23,7 @@ - */ - - #include -+#include - - #include - #include diff --git a/ipv6/mrd6/patches/003-debian.patch b/ipv6/mrd6/patches/003-debian.patch deleted file mode 100644 index 6b99958bc..000000000 --- a/ipv6/mrd6/patches/003-debian.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- mrd6-0.9.6.orig/src/log.cpp -+++ mrd6-0.9.6/src/log.cpp -@@ -667,3 +667,12 @@ - os.nprintf(32, "%p", val); - } - -+#ifdef __s390__ -+const char *stream_type_format_parameter(size_t) { -+ return "u"; -+} -+ -+void stream_push_formated_type(base_stream &os, size_t val) { -+ os.nprintf(32, "%z", val); -+} -+#endif ---- mrd6-0.9.6.orig/src/mrd.cpp -+++ mrd6-0.9.6/src/mrd.cpp -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -2338,7 +2339,8 @@ - - out.xprintf("Uptime: %{duration}\n", time_duration((time(0) - m_startup) * 1000)); - out.xprintf("Performed tasks: %u (spent %llu ms)\n", m_tasks_stat, m_tasks_time_spent); -- out.xprintf("Registered sockets: %u reading, %u writing\n", m_read.size(), m_write.size()); -+ out.xprintf("Registered sockets: %u reading, %u writing\n", -+ (uint32_t)m_read.size(), (uint32_t)m_write.size()); - out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count()); - out.xprintf("Interface count: %u\n", m_intflist.size()); - out.xprintf("Group state count: %u\n", m_grplist.size()); ---- mrd6-0.9.6.orig/src/bgp/bgp.cpp -+++ mrd6-0.9.6/src/bgp/bgp.cpp -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - - #include - ---- mrd6-0.9.6.orig/src/linux/mrd_components.cpp -+++ mrd6-0.9.6/src/linux/mrd_components.cpp -@@ -92,8 +92,6 @@ - #if defined(__GLIBC__) - #if defined(__i386__) - return (void *)base->uc_mcontext.gregs[REG_EIP]; --#elif defined(__mips__) -- return (void *)base->uc_mcontext.gpregs[CTX_EPC]; - #endif - #endif - return 0; ---- mrd6-0.9.6.orig/include/mrd/log.h -+++ mrd6-0.9.6/include/mrd/log.h -@@ -53,6 +53,12 @@ - void stream_push_formated_type(base_stream &, const char *val); - void stream_push_formated_type(base_stream &, const void *val); - -+ -+#ifdef __s390__ -+const char *stream_type_format_parameter(size_t); -+void stream_push_formated_type(base_stream &, size_t val); -+#endif -+ - /*! - * base log stream - */ diff --git a/ipv6/mrd6/patches/004-ambiguous_call_fix.patch b/ipv6/mrd6/patches/004-ambiguous_call_fix.patch deleted file mode 100644 index a72eb24b1..000000000 --- a/ipv6/mrd6/patches/004-ambiguous_call_fix.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/mrd.cpp -+++ b/src/mrd.cpp -@@ -2342,8 +2342,8 @@ bool mrd::show_info(base_stream &out, co - out.xprintf("Registered sockets: %u reading, %u writing\n", - (uint32_t)m_read.size(), (uint32_t)m_write.size()); - out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count()); -- out.xprintf("Interface count: %u\n", m_intflist.size()); -- out.xprintf("Group state count: %u\n", m_grplist.size()); -+ out.xprintf("Interface count: %u\n", (uint32_t)m_intflist.size()); -+ out.xprintf("Group state count: %u\n", (uint32_t)m_grplist.size()); - - return true; - } -- 2.11.0