From: Wojciech Dubowik Date: Tue, 24 Jan 2017 15:37:17 +0000 (+0100) Subject: linuxptp: Upgrade to v1.9 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F5867%2Fhead;p=feed%2Fpackages.git linuxptp: Upgrade to v1.9 Plus one upstream fix. Signed-off-by: Wojciech Dubowik --- diff --git a/net/linuxptp/Makefile b/net/linuxptp/Makefile index 1d84748fef..cdd91866ae 100644 --- a/net/linuxptp/Makefile +++ b/net/linuxptp/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linuxptp -PKG_VERSION:=1.8 +PKG_VERSION:=1.9 PKG_RELEASE:=4 PKG_MAINTAINER:=Wojciech Dubowik PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION) -PKG_HASH:=fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165 +PKG_MD5SUM:=335d60c00cd5b2d5aaaa8b2d5cd921bf PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/net/linuxptp/patches/001-musl-fix.patch b/net/linuxptp/patches/001-musl-fix.patch deleted file mode 100644 index b79a84bad2..0000000000 --- a/net/linuxptp/patches/001-musl-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/raw.c -+++ b/raw.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include ---- a/util.h -+++ b/util.h -@@ -20,6 +20,8 @@ - #ifndef HAVE_UTIL_H - #define HAVE_UTIL_H - -+#include -+ - #include "ddt.h" - #include "ether.h" - diff --git a/net/linuxptp/patches/002-netdb_fix.patch b/net/linuxptp/patches/002-netdb_fix.patch deleted file mode 100644 index 2535568798..0000000000 --- a/net/linuxptp/patches/002-netdb_fix.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 60db5d0b0fd8be9afede7e8a14e708f5429f2023 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Sun, 7 May 2017 11:16:06 -0700 -Subject: [PATCH] udp: Avoid including netdb.h - -netdb.h pulls in a large chain of include files: -rpc/netdb.h -rpc/types.h - -rpc/types.h re-defines TRUE/FALSE and does it in this way: - - #ifndef FALSE - # define FALSE (0) - #endif - - #ifndef TRUE - # define TRUE (1) - #endif - -And this later causes build problems that appear in this way: - -mipsel-linux-gnu-gcc -Wall -DVER=1.8 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME --DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -Os -pipe -mno-branch-likely --mips32r2 -mtune=24kc -fno-caller-saves -Wno-unused-result --D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro --I/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/include --I/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/include --I/home/florian/dev/toolchains/stbgcc-4.8-1.5/usr/include --I/home/florian/dev/toolchains/stbgcc-4.8-1.5/include --DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o -udp.o udp.c -In file included from -/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/include/rpc/netdb.h:45:0, - from -/home/florian/dev/toolchains/stbgcc-4.8-1.5/mipsel-linux-gnu/sys-root/usr/include/netdb.h:32, - from udp.c:23: -pdt.h:25:7: error: expected identifier before '(' token - enum {FALSE, TRUE}; - ^ -: recipe for target 'udp.o' failed - -Upon inspection, it does not appear that netdb.h is providing any useful -definition or declaration, so let's just remove its inclusion. - -Signed-off-by: Florian Fainelli ---- - udp.c | 1 - - udp6.c | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/udp.c b/udp.c -index 6dabc31836fe..530a2ee3748d 100644 ---- a/udp.c -+++ b/udp.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/udp6.c b/udp6.c -index c229cac0c41c..89e27bf9e863 100644 ---- a/udp6.c -+++ b/udp6.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.11.0 - diff --git a/net/linuxptp/patches/030-upstream.patch b/net/linuxptp/patches/030-upstream.patch new file mode 100644 index 0000000000..bdb8fb7e28 --- /dev/null +++ b/net/linuxptp/patches/030-upstream.patch @@ -0,0 +1,37 @@ +From d14f11fd329a7da94c0d0190a169f743eb91031b Mon Sep 17 00:00:00 2001 +From: Richard Cochran +Date: Mon, 2 Apr 2018 20:19:51 -0700 +Subject: [PATCH] msg: Append multiple TLVs correctly. + +The logic that adds TLVs to the end of a message mixes up the 'L' +length in "TLV" with the total TLV length. As a result, the second +and subsequent TLVs will corrupt the previous TLV in the buffer. This +patch corrects the code to find the correct offset for the second and +following appended TLVs. + +Note that the stack does not currently trigger this latent bug because +only single TLVs are appended. + +Fixes: 4a8877f90462 ("msg: Introduce method for appending multiple TLVs on transmit.") + +Signed-off-by: Richard Cochran +--- + msg.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/msg.c b/msg.c +index b7e1053..c004568 100644 +--- a/msg.c ++++ b/msg.c +@@ -151,6 +151,8 @@ static struct tlv_extra *msg_tlv_prepare(struct ptp_message *msg, int length) + tmp = TAILQ_LAST(&msg->tlv_list, tlv_list); + if (tmp) { + ptr = (uint8_t *) tmp->tlv; ++ ptr += sizeof(tmp->tlv->type); ++ ptr += sizeof(tmp->tlv->length); + ptr += tmp->tlv->length; + } + +-- +2.7.4 +