1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00

follow raw socket behaviour change on 11 and later.

Submitted by:	guido
This commit is contained in:
Hajimu UMEMOTO 2017-10-09 17:25:02 +00:00
parent 0f3c68c4a0
commit d4c2a24ef8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=451626
2 changed files with 13 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= u6rd
PORTVERSION= 1.6
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= http://ftp.scythe.jp/pub/u6rd/release/

View File

@ -0,0 +1,12 @@
--- main.c.orig 2013-06-19 11:23:58 UTC
+++ main.c
@@ -608,7 +608,8 @@ tun2raw(struct connection *c)
ip4 = (struct ipv4_header *)(buf - sizeof(*ip4));
ip4->ver_hlen = 4 << 4 | sizeof(*ip4) >> 2;
ip4->tos = ntohl(ip6->ver_class_label) >> 20 & 0xff;
-#if defined(__OpenBSD__) || defined(__linux__)
+#if defined(__OpenBSD__) || defined(__linux__) || \
+ (defined(__FreeBSD__) && __FreeBSD_version >= 1100030)
ip4->len = htons(len + sizeof(*ip4));
#else
ip4->len = len + sizeof(*ip4);