Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 572566 Details for
Bug 683160
tinc-1.0.35: RFC, PATCH: fix icmpv6 checksum
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tinc-1.0.35-icmpv6-checksum.patch
tinc-1.0.35-icmpv6-checksum.patch (text/plain), 3.37 KB, created by
Benda Xu
on 2019-04-12 14:36:43 UTC
(
hide
)
Description:
tinc-1.0.35-icmpv6-checksum.patch
Filename:
MIME Type:
Creator:
Benda Xu
Created:
2019-04-12 14:36:43 UTC
Size:
3.37 KB
patch
obsolete
>commit 49b75419030323012fcdb2d272ea12416ed174a2 >Author: Benda Xu <heroxbd@gentoo.org> >Date: Fri Apr 12 22:26:47 2019 +0800 > > net-vpn/tinc: fix the incorrect ipv6 checksum. > > Reference: https://bugs.debian.org/891400 > Package-Manager: Portage-2.3.52, Repoman-2.3.12 > Signed-off-by: Benda Xu <heroxbd@gentoo.org> > >diff --git a/net-vpn/tinc/files/tinc-1.0.35-icmpv6-checksum.patch b/net-vpn/tinc/files/tinc-1.0.35-icmpv6-checksum.patch >new file mode 100644 >index 000000000000..dbe42b6a5da3 >--- /dev/null >+++ b/net-vpn/tinc/files/tinc-1.0.35-icmpv6-checksum.patch >@@ -0,0 +1,29 @@ >+From: Benda Xu <heroxbd@gentoo.org> >+Forwarded: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891400 >+Subject: Tinc generated icmp6 checksum is not correct. >+ >+Description: >+When PMTUDiscovery=yes and Mode=switch, and if ipv6 is used inside >+tinc, the ICMPv6 "Packet Too Big" packets have incorrect checksums. >+It can be reproduced by `ping6 <host in tinc> -s 1800` and `tcpdump -i >+<tinc interface>`. Consequently, the host ignores the tinc-generated >+ICMPv6 packets, PMTUDiscovery does not work and the connections freeze >+when data flows are big. >+ >+I find the bug is gone if the function "inet_checksum" in route.c is >+not inlined, either by compiling tinc with "-O2 -fno-inline-functions", >+or apply a patch such as, >+ >+diff --git a/src/route.c b/src/route.c >+index ff82c06e..cd55383a 100644 >+--- a/src/route.c >++++ b/src/route.c >+@@ -60,7 +60,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr); >+ >+ /* RFC 1071 */ >+ >+-static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { >++__attribute__ ((noinline)) static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { >+ uint16_t *p = data; >+ uint32_t checksum = prevsum ^ 0xFFFF; >+ >diff --git a/net-vpn/tinc/tinc-1.0.35-r2.ebuild b/net-vpn/tinc/tinc-1.0.35-r2.ebuild >new file mode 100644 >index 000000000000..2fa743b086eb >--- /dev/null >+++ b/net-vpn/tinc/tinc-1.0.35-r2.ebuild >@@ -0,0 +1,55 @@ >+# Copyright 1999-2019 Gentoo Authors >+# Distributed under the terms of the GNU General Public License v2 >+ >+EAPI=7 >+inherit systemd >+ >+DESCRIPTION="tinc is an easy to configure VPN implementation" >+HOMEPAGE="http://www.tinc-vpn.org/" >+ >+UPSTREAM_VER=0 >+ >+[[ -n ${UPSTREAM_VER} ]] && \ >+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" >+ >+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz >+ ${UPSTREAM_PATCHSET_URI}" >+ >+LICENSE="GPL-2" >+SLOT="0" >+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" >+IUSE="libressl +lzo uml vde +zlib" >+ >+DEPEND=" >+ !libressl? ( dev-libs/openssl:0= ) >+ libressl? ( dev-libs/libressl:0= ) >+ lzo? ( dev-libs/lzo:2 ) >+ zlib? ( sys-libs/zlib )" >+RDEPEND="${DEPEND} >+ vde? ( net-misc/vde )" >+ >+# Upstream's patchset >+if [[ -n ${UPSTREAM_VER} ]]; then >+ PATCHES=( "${WORKDIR}"/patches-upstream ) >+fi >+PATCHES+=( "${FILESDIR}"/${PN}-1.0.35-icmpv6-checksum.patch ) >+ >+src_configure() { >+ econf \ >+ --enable-jumbograms \ >+ --disable-tunemu \ >+ $(use_enable lzo) \ >+ $(use_enable uml) \ >+ $(use_enable vde) \ >+ $(use_enable zlib) >+} >+ >+src_install() { >+ emake DESTDIR="${D}" install >+ dodir /etc/tinc >+ dodoc AUTHORS NEWS README THANKS >+ doconfd "${FILESDIR}"/tinc.networks >+ newconfd "${FILESDIR}"/tincd.conf tincd >+ newinitd "${FILESDIR}"/tincd-r1 tincd >+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service" >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 683160
: 572566 |
572852