diff options
author | Wojciech Dubowik <klute99@gmail.com> | 2017-01-24 16:37:17 +0100 |
---|---|---|
committer | Wojciech Dubowik <Wojciech.Dubowik@neratec.com> | 2018-04-03 09:13:01 +0200 |
commit | 92bc48de9b8669adb367357c95850508c2333f5d (patch) | |
tree | 4e2e6983f138a5618d5cebcbe1f34e3774fcfdd0 /net/linuxptp/patches | |
parent | 7c0dd7ae879ae627fcbcbb6b675e0b4478787cf5 (diff) |
linuxptp: Upgrade to v1.9
Plus one upstream fix.
Signed-off-by: Wojciech Dubowik <klute99@gmail.com>
Diffstat (limited to 'net/linuxptp/patches')
-rw-r--r-- | net/linuxptp/patches/001-musl-fix.patch | 21 | ||||
-rw-r--r-- | net/linuxptp/patches/002-netdb_fix.patch | 77 | ||||
-rw-r--r-- | net/linuxptp/patches/030-upstream.patch | 37 |
3 files changed, 37 insertions, 98 deletions
diff --git a/net/linuxptp/patches/001-musl-fix.patch b/net/linuxptp/patches/001-musl-fix.patch deleted file mode 100644 index b79a84bad..000000000 --- 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 <fcntl.h> - #include <linux/filter.h> - #include <linux/if_ether.h> --#include <net/ethernet.h> - #include <net/if.h> - #include <netinet/in.h> - #include <netpacket/packet.h> ---- a/util.h -+++ b/util.h -@@ -20,6 +20,8 @@ - #ifndef HAVE_UTIL_H - #define HAVE_UTIL_H - -+#include <time.h> -+ - #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 253556879..000000000 --- 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 <f.fainelli@gmail.com> -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}; - ^ -<builtin>: 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 <f.fainelli@gmail.com> ---- - 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 <errno.h> - #include <fcntl.h> - #include <net/if.h> --#include <netdb.h> - #include <netinet/in.h> - #include <stdio.h> - #include <stdlib.h> -diff --git a/udp6.c b/udp6.c -index c229cac0c41c..89e27bf9e863 100644 ---- a/udp6.c -+++ b/udp6.c -@@ -20,7 +20,6 @@ - #include <errno.h> - #include <fcntl.h> - #include <net/if.h> --#include <netdb.h> - #include <netinet/in.h> - #include <stdio.h> - #include <stdlib.h> --- -2.11.0 - diff --git a/net/linuxptp/patches/030-upstream.patch b/net/linuxptp/patches/030-upstream.patch new file mode 100644 index 000000000..bdb8fb7e2 --- /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 <richardcochran@gmail.com> +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 <richardcochran@gmail.com> +--- + 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 + |