mrd6: remove it

According to the author [1]:
1. It is no longer supported and maintained.
2. It is no longer necessary as since 2005 the native multicast
   forwarding support was added to the Linux Kernel

As alternative pimbd could be used.

[1] c805eb3325

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
Josef Schlehofer 2022-02-27 13:48:32 +01:00 committed by Nick Hainke
parent c9a7659f2f
commit 528bb41cc9
7 changed files with 0 additions and 269 deletions

View File

@ -1,81 +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_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/hugosantos/mrd6.git
PKG_SOURCE_DATE:=2013-11-30
PKG_SOURCE_VERSION:=c805eb33255dbc0b6647d463c6c67d1c9d3105a0
PKG_MIRROR_HASH:=976243b967c18fcbf64d26158898245264c6d03d498826b104e6c92406a8f64f
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=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:=@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" \
KERNEL=Linux
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))

View File

@ -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::;

View File

@ -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
}

View File

@ -1,54 +0,0 @@
--- /dev/null
+++ b/include/mrdpriv/linux/netlink_missing_defs.h
@@ -0,0 +1,41 @@
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+
+#include <linux/if_link.h>
+#include <linux/if_addr.h>
+#include <linux/neighbour.h>
+
+#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
--- a/src/linux/linux_unicast_route.cpp
+++ b/src/linux/linux_unicast_route.cpp
@@ -23,6 +23,7 @@
*/
#include <mrdpriv/linux/unicast_route.h>
+#include <mrdpriv/linux/netlink_missing_defs.h>
#include <mrd/mrd.h>
#include <mrd/interface.h>

View File

@ -1,29 +0,0 @@
From b70c7d519ddd178b76d89bca7d3fe1fd186af862 Mon Sep 17 00:00:00 2001
From: Oryon <pierre@darou.fr>
Date: Tue, 11 Mar 2014 12:12:07 +0100
Subject: [PATCH 1/2] Accept default routes without RTA_DST
---
src/linux/linux_unicast_route.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/src/linux/linux_unicast_route.cpp
+++ b/src/linux/linux_unicast_route.cpp
@@ -335,7 +335,7 @@ void linux_unicast_router::handle_route_
netlink_msg::parse_rtatable(tb, RTA_MAX, RTM_RTA(NLMSG_DATA(hdr)),
hdr->nlmsg_len - NLMSG_LENGTH(sizeof(rtmsg)));
- if (tb[RTA_DST]) {
+ //if (tb[RTA_DST]) { /* Accept default routes */
lookup_result res;
parse_prefix_rec(tb, msg->r.rtm_dst_len,
@@ -361,7 +361,7 @@ void linux_unicast_router::handle_route_
}
prefix_changed(isnew, res);
- }
+ //}
}
void linux_unicast_router::handle_intf_event(bool isnew, nlmsghdr *hdr) {

View File

@ -1,33 +0,0 @@
From 46093914a5f95f50c9aef088b7172d6774d204cb Mon Sep 17 00:00:00 2001
From: Oryon <pierre@darou.fr>
Date: Tue, 11 Mar 2014 16:03:58 +0100
Subject: [PATCH 2/2] Metric should be more important than distance at lookup
---
src/mrib.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/src/mrib.cpp
+++ b/src/mrib.cpp
@@ -327,16 +327,16 @@ mrib_def::mrib_node *mrib_def::prefix_lo
void mrib_def::insert_prefix_in_node(mrib_node *n, prefix *p) {
prefix *curr = n->head, *prev = 0;
- /* first check the proper place based on distance */
- while (curr && curr->distance < p->distance) {
+ /* first check the proper place based on metric */
+ while (curr && curr->metric < p->metric) {
prev = curr;
curr = curr->next;
}
- if (prev && prev->distance == p->distance) {
- /* if distance matches, take metric into place */
+ if (prev && prev->metric == p->metric) {
+ /* if metric matches, take distance into place */
curr = prev;
- while (curr && curr->metric <= p->metric) {
+ while (curr && curr->distance <= p->distance) {
prev = curr;
curr = curr->next;
}

View File

@ -1,45 +0,0 @@
From deb013d93c3ce78891386637d6b3300289130df6 Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <robotux@celest.fr>
Date: Sun, 7 Aug 2016 22:28:50 +0100
Subject: Make build reproducible
Remove build date from the binary so that two builds on different dates
are binary identical.
Origin: upstream, https://github.com/hugosantos/mrd6/commit/14f27d5528a3e4c8e5369bdee0e35961a2491661
Forwarded: https://github.com/hugosantos/mrd6/pull/30
Last-Update: 2016-08-09
Applied-Upstream: commit: 14f27d5528a3e4c8e5369bdee0e35961a2491661
---
src/Makefile | 1 -
src/mrd.cpp | 2 --
2 files changed, 3 deletions(-)
--- a/src/Makefile
+++ b/src/Makefile
@@ -185,7 +185,6 @@ endif
$(MRD_VERSION_CPP): $(SOURCES) Makefile Makefile.options
@set -e; mkdir -p $(dir $@); \
echo '/* This file is automatically generated */' > $(MRD_VERSION_CPP); \
- echo 'const char *BuildDate = "$(NOW)";' >> $(MRD_VERSION_CPP)
$(MODULES_CPP): Makefile Makefile.options
@set -e; mkdir -p $(dir $@); \
--- a/src/mrd.cpp
+++ b/src/mrd.cpp
@@ -75,7 +75,6 @@
mrd *g_mrd = 0;
-extern const char *BuildDate;
static const char *VersionInfo = "mrd6 0.10.0";
static const char *defaultconffiles[] = {
@@ -2335,7 +2334,6 @@ bool mrd::socket_regs(base_stream &out,
void mrd::show_base_info(base_stream &out) const {
out.xprintf("Version: %s\n", VersionInfo);
- out.xprintf("Build date: %s\n", BuildDate);
}
bool mrd::show_info(base_stream &out, const std::vector<std::string> &ctx) {