diff options
Diffstat (limited to 'net-misc/mcproxy')
-rw-r--r-- | net-misc/mcproxy/Manifest | 7 | ||||
-rw-r--r-- | net-misc/mcproxy/files/fix_checksum_calculation.patch | 41 | ||||
-rw-r--r-- | net-misc/mcproxy/files/mcproxy.confd | 5 | ||||
-rw-r--r-- | net-misc/mcproxy/files/mcproxy.initd | 27 | ||||
-rw-r--r-- | net-misc/mcproxy/files/mcproxy.service | 10 | ||||
-rw-r--r-- | net-misc/mcproxy/mcproxy-1.1.1.ebuild | 55 | ||||
-rw-r--r-- | net-misc/mcproxy/metadata.xml | 29 |
7 files changed, 174 insertions, 0 deletions
diff --git a/net-misc/mcproxy/Manifest b/net-misc/mcproxy/Manifest new file mode 100644 index 000000000000..a8816ee3664f --- /dev/null +++ b/net-misc/mcproxy/Manifest @@ -0,0 +1,7 @@ +AUX fix_checksum_calculation.patch 1154 BLAKE2B adb80fa3b87106c8953675205cc580d13f1d5e4e9d93bfd05b87d9aa4843086ff7682c4ea47ec573654e39cc3ab2961d9daa69f8335043f63e8e623ad331ec0b SHA512 8b31c6758054d250fbbe91eef62d5a6df93ca0fa700730308c34a7402868644d7ed709c642a84a5f296217c6f3cf8132fba7a8506f54c951a2381cc1bf288cd8 +AUX mcproxy.confd 160 BLAKE2B 5c2e387bbcb5de69412b1b08b63bedab8346363c4d303336c504a5166396f4d09f18a5e203d5fd73abec5f55666742af26a6baa28d8e51fbcc1f7c3b35310965 SHA512 c7096d15afe94002197ee696ea94b88bb85d646c67bb3a2debf8d07098565d35399232610c7bccc0a13a390f6f6be8aad4295f2bf575e7940fb617651a945414 +AUX mcproxy.initd 580 BLAKE2B aff88e8962c7861140f4a11568cab5aaa17df153bcd88b6057f3f17cbad2ee46693db681f1307daa569d4c67e258ab7ab8123c18bffd39fc924b34dd483ab2af SHA512 9f5eaeb39ef5a5cbd8af70f23f17e609f783204ee2dc458128f41a4327eb9f5b8f7f77ae1d642121e7a4af4f6778e65bc97bf0c0b800606c0ce2d6ec79c18f95 +AUX mcproxy.service 161 BLAKE2B c218284289627ae733746263662c16579a617b740825e8b6e0032e9531e17c4c4f0d6bc88d6db2fd6ebbc4a9dcb6bb3dc181fea859e152eef8c53978944a6c0c SHA512 a8298d9278ee934289832d360e502268739e415681c8ecf1c69b93d80ec75094ef32e7f9618ed243a6c05a8facd7aee0b5be591aa6dfce0fcf4658bed845b830 +DIST mcproxy-1.1.1.tar.gz 3373209 BLAKE2B 0b54f7c20b9d6d66c5b88daeaa00901918057b449b932656355303a83c4e4f1feb370de0c55e55484b9bafc63bfd82b8ef8179144529f3074e3d94e147cc8ff5 SHA512 408bc27169c9c90080c7842aaeaf260d5349b735e017d1750118f190124f48743fbf15fc05eee16290e38cc2f752e27b28548714a3d0cd2366dfc53dafcda0bb +EBUILD mcproxy-1.1.1.ebuild 1070 BLAKE2B 69ce9ea37e22eeae0cf7d4952a463ea6c9ea808a34b8b76f1a56d3c2044b6fb462cd9dd8070a1e90014096140951cfa3b86d594ea288fbb23f57f64e712c718f SHA512 5c116fed92133d3245f401b5412d7c6dcd87818f5c1e7e4a7693bff04281fa10d388311876e258b4e85cdb80e59a2975289c6a4bfe2b9fec604e35bd5f941392 +MISC metadata.xml 1382 BLAKE2B 5c7f722ba8c8886c41ee6cd5fb894e60d259718cc33b1898049f71cff039872272b6120faae28378c4f3722e5cc97154577899141caf2c6c0792443a67dbaad0 SHA512 99b20c4f17439db3e04cb85c2355a2944353adb3015b627f9f91836d9ae49efa54d044e153ec73980cab04ee78bbf1c1a9e38bb132284b46fce31859a7c9a3f8 diff --git a/net-misc/mcproxy/files/fix_checksum_calculation.patch b/net-misc/mcproxy/files/fix_checksum_calculation.patch new file mode 100644 index 000000000000..2cbfb6590b72 --- /dev/null +++ b/net-misc/mcproxy/files/fix_checksum_calculation.patch @@ -0,0 +1,41 @@ +From 93b5ace42268160ebbfff4c61818fb15fa2d9b99 Mon Sep 17 00:00:00 2001 +From: Sebastian Woelke <Sebastian.Woelke@posteo.de> +Date: Thu, 24 Aug 2017 14:41:50 +0200 +Subject: [PATCH] Fix checksum calculation + +--- + mcproxy/src/utils/mroute_socket.cpp | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/mcproxy/src/utils/mroute_socket.cpp b/mcproxy/src/utils/mroute_socket.cpp +index 61289dd..3a55359 100644 +--- a/src/utils/mroute_socket.cpp ++++ b/src/utils/mroute_socket.cpp +@@ -157,17 +157,23 @@ u_int16_t mroute_socket::calc_checksum(const unsigned char* buf, int buf_size) c + + u_int16_t* b = (u_int16_t*)buf; + int sum = 0; ++ int csum; + + for (int i = 0; i < buf_size / 2; i++) { +- ADD_SIGNED_NUM_U16(sum, b[i]); +- //sum +=b[i]; ++ sum +=b[i]; + } + + if (buf_size % 2 == 1) { +- //sum += buf[buf_size-1]; +- ADD_SIGNED_NUM_U16(sum, buf[buf_size - 1]); ++ sum += buf[buf_size-1]; + } + ++ // fold checksum ++ csum = sum & 0xFFFF; ++ sum = sum >> 16; ++ sum += csum; ++ // fold again in case of overflow. ++ sum += sum >> 16; ++ + return ~sum; + } + diff --git a/net-misc/mcproxy/files/mcproxy.confd b/net-misc/mcproxy/files/mcproxy.confd new file mode 100644 index 000000000000..908bc353d4d9 --- /dev/null +++ b/net-misc/mcproxy/files/mcproxy.confd @@ -0,0 +1,5 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Additional command line options +# MCPROXY_OPTS="" diff --git a/net-misc/mcproxy/files/mcproxy.initd b/net-misc/mcproxy/files/mcproxy.initd new file mode 100644 index 000000000000..44efd721c549 --- /dev/null +++ b/net-misc/mcproxy/files/mcproxy.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +config="/etc/${RC_SVCNAME}.conf" +extra_commands="checkconfig" +name="Mcproxy" +pidfile="/run/${RC_SVCNAME}.pid" + +command="mcproxy" +command_background="true" +command_args="${MCPROXY_OPTS} -f ${config}" +command_args_checkconfig="-c" +procname="${RC_SVCNAME}" + +checkconfig() { + ${command} ${command_args_checkconfig} +} + +start_pre() { + if [ ! -f "${config}" ]; then + eerror "Please create ${config} before starting ${name}!" + return 1 + else + return 0 + fi +} diff --git a/net-misc/mcproxy/files/mcproxy.service b/net-misc/mcproxy/files/mcproxy.service new file mode 100644 index 000000000000..0bad0f19cc86 --- /dev/null +++ b/net-misc/mcproxy/files/mcproxy.service @@ -0,0 +1,10 @@ +[Unit] +After=network-online.target +Description=Mcproxy + +[Service] +ExecStart=/usr/bin/mcproxy -f /etc/mcproxy.conf +Type=simple + +[Install] +WantedBy=network.target diff --git a/net-misc/mcproxy/mcproxy-1.1.1.ebuild b/net-misc/mcproxy/mcproxy-1.1.1.ebuild new file mode 100644 index 000000000000..463944737b3b --- /dev/null +++ b/net-misc/mcproxy/mcproxy-1.1.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit linux-info qmake-utils systemd + +DESCRIPTION="A multicast proxy for IGMP/MLD" +HOMEPAGE="https://mcproxy.realmv6.org/ https://github.com/mcproxy/mcproxy" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +KEYWORDS="~amd64 ~x86" +LICENSE="GPL-2+" +SLOT="0" +IUSE="doc" + +DEPEND="dev-qt/qtcore:5 + doc? ( app-doc/doxygen )" + +S="${WORKDIR}/${P}/${PN}" + +PATCHES=( "${FILESDIR}/fix_checksum_calculation.patch" ) + +CONFIG_CHECK="~IP_MULTICAST ~IP_MROUTE" + +src_prepare() { + # Change install path from '/usr/local/bin' to '/usr/bin' + sed -e 's/local//' -i mcproxy.pro || die + + default +} + +src_configure() { + eqmake5 +} + +src_compile() { + default + + use doc && emake doc +} + +src_install() { + emake INSTALL_ROOT="${ED%/}" install + + insinto /etc + doins mcproxy.conf + + newinitd "${FILESDIR}"/mcproxy.initd mcproxy + systemd_dounit "${FILESDIR}"/mcproxy.service + + newconfd "${FILESDIR}"/mcproxy.confd mcproxy + + use doc && dodoc -r ../docs/. +} diff --git a/net-misc/mcproxy/metadata.xml b/net-misc/mcproxy/metadata.xml new file mode 100644 index 000000000000..e601c26a3075 --- /dev/null +++ b/net-misc/mcproxy/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ck+gentoo@bl4ckb0x.de</email> + <name>Conrad Kostecki</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + IGMP/MLD proxies offer the possibility option to combine + local multicast networks with a larger multicast infrastructure. + In contrast to multicast routers, proxies are lightweight and + do not require the support of a multicast routing protocol such as PIM or DVMRP. + A common use case is a local stub networks that interconnects with + a remote multicast routing domain, e.g. via a tunnel. + But it can also be used in PMIPv6 domain to enable multicast for sources and listeners (RFC 6224). + The Mcproxy meets the requirements of the IGMP/MLD proxying standard (RFC 4605) + and has additional functionalities. The multicast proxy can be instantiated multiple times, + is dynamically configurable at runtime, supports multiple upstreams and peering-interfaces + for a non hierarchical interconnection of multicast proxies. + </longdescription> + <upstream> + <bugs-to>https://github.com/mcproxy/mcproxy/issues</bugs-to> + <remote-id type="github">mcproxy/mcproxy</remote-id> + </upstream> +</pkgmetadata> |