diff options
| author | William A. Kennington III <wak@google.com> | 2021-09-14 13:57:13 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-09-14 16:18:18 -0700 |
| commit | 704fe4c9c844461877fd28be75defeb669173cec (patch) | |
| tree | 3cdf14b25842236b05cf9b222b74636cb90cfc0f | |
| parent | 4ed048fb055ca3fd91d2c7fe128f6d67b772aa25 (diff) | |
| download | meta-openembedded-704fe4c9c844461877fd28be75defeb669173cec.tar.gz | |
ndisc6: Upgrade 1.0.4 -> 1.0.5
STABLE RELEASE 1.0.5:
- Add --no-solicit option to skip sending the discovery packet.
- Ignore multicast advertisements when discovery was sent as unicast
- Since its point release, no need to use +git${SRCPV} in PV it can be
absolute
Signed-off-by: William A. Kennington III <wak@google.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 2 insertions, 158 deletions
diff --git a/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch b/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch deleted file mode 100644 index dc58b5b79e..0000000000 --- a/meta-networking/recipes-support/ndisc6/ndisc6/0001-replace-VLAIS-with-malloc-free-pair.patch +++ /dev/null | |||
| @@ -1,124 +0,0 @@ | |||
| 1 | From 3a7d5396e633e6c02a4583be7faf3d79d0d33748 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 31 Aug 2017 11:14:41 -0700 | ||
| 4 | Subject: [PATCH 1/2] replace VLAIS with malloc/free pair | ||
| 5 | |||
| 6 | Makes it compatible with non-gnu compilers | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | src/trace-icmp.c | 7 +++++-- | ||
| 13 | src/trace-tcp.c | 14 ++++++++++---- | ||
| 14 | src/trace-udp.c | 7 +++++-- | ||
| 15 | 3 files changed, 20 insertions(+), 8 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/trace-icmp.c b/src/trace-icmp.c | ||
| 18 | index 842938e..c76cb54 100644 | ||
| 19 | --- a/src/trace-icmp.c | ||
| 20 | +++ b/src/trace-icmp.c | ||
| 21 | @@ -43,16 +43,19 @@ send_echo_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 22 | struct | ||
| 23 | { | ||
| 24 | struct icmp6_hdr ih; | ||
| 25 | - uint8_t payload[plen - sizeof (struct icmp6_hdr)]; | ||
| 26 | + uint8_t *payload; | ||
| 27 | } packet; | ||
| 28 | memset (&packet, 0, plen); | ||
| 29 | + packet.payload = malloc(plen - sizeof (struct icmp6_hdr)); | ||
| 30 | |||
| 31 | packet.ih.icmp6_type = ICMP6_ECHO_REQUEST; | ||
| 32 | packet.ih.icmp6_id = htons (getpid ()); | ||
| 33 | packet.ih.icmp6_seq = htons ((ttl << 8) | (n & 0xff)); | ||
| 34 | (void)port; | ||
| 35 | |||
| 36 | - return send_payload (fd, &packet.ih, plen, ttl); | ||
| 37 | + ssize_t ret = send_payload (fd, &packet.ih, plen, ttl); | ||
| 38 | + free(packet.payload); | ||
| 39 | + return ret; | ||
| 40 | } | ||
| 41 | |||
| 42 | |||
| 43 | diff --git a/src/trace-tcp.c b/src/trace-tcp.c | ||
| 44 | index 940f918..62d22ff 100644 | ||
| 45 | --- a/src/trace-tcp.c | ||
| 46 | +++ b/src/trace-tcp.c | ||
| 47 | @@ -54,10 +54,11 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 48 | struct | ||
| 49 | { | ||
| 50 | struct tcphdr th; | ||
| 51 | - uint8_t payload[plen - sizeof (struct tcphdr)]; | ||
| 52 | + uint8_t *payload; | ||
| 53 | } packet; | ||
| 54 | |||
| 55 | memset (&packet, 0, sizeof (packet)); | ||
| 56 | + packet.payload = malloc(plen - sizeof (struct tcphdr)); | ||
| 57 | packet.th.th_sport = sport; | ||
| 58 | packet.th.th_dport = port; | ||
| 59 | packet.th.th_seq = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ()); | ||
| 60 | @@ -65,7 +66,9 @@ send_syn_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 61 | packet.th.th_flags = TH_SYN | (ecn ? (TH_ECE | TH_CWR) : 0); | ||
| 62 | packet.th.th_win = htons (TCP_WINDOW); | ||
| 63 | |||
| 64 | - return send_payload (fd, &packet, plen, ttl); | ||
| 65 | + ssize_t ret = send_payload (fd, &packet, plen, ttl); | ||
| 66 | + free(packet.payload); | ||
| 67 | + return ret; | ||
| 68 | } | ||
| 69 | |||
| 70 | |||
| 71 | @@ -131,10 +134,11 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 72 | struct | ||
| 73 | { | ||
| 74 | struct tcphdr th; | ||
| 75 | - uint8_t payload[plen - sizeof (struct tcphdr)]; | ||
| 76 | + uint8_t *payload; | ||
| 77 | } packet; | ||
| 78 | |||
| 79 | memset (&packet, 0, sizeof (packet)); | ||
| 80 | + packet.payload = malloc(plen - sizeof (struct tcphdr)); | ||
| 81 | packet.th.th_sport = sport; | ||
| 82 | packet.th.th_dport = port; | ||
| 83 | packet.th.th_ack = htonl ((ttl << 24) | (n << 16) | (uint16_t)getpid ()); | ||
| 84 | @@ -142,7 +146,9 @@ send_ack_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 85 | packet.th.th_flags = TH_ACK; | ||
| 86 | packet.th.th_win = htons (TCP_WINDOW); | ||
| 87 | |||
| 88 | - return send_payload (fd, &packet, plen, ttl); | ||
| 89 | + ssize_t ret = send_payload (fd, &packet, plen, ttl); | ||
| 90 | + free(packet.payload); | ||
| 91 | + return ret; | ||
| 92 | } | ||
| 93 | |||
| 94 | |||
| 95 | diff --git a/src/trace-udp.c b/src/trace-udp.c | ||
| 96 | index 4adde6b..a6cbb07 100644 | ||
| 97 | --- a/src/trace-udp.c | ||
| 98 | +++ b/src/trace-udp.c | ||
| 99 | @@ -46,9 +46,10 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 100 | struct | ||
| 101 | { | ||
| 102 | struct udphdr uh; | ||
| 103 | - uint8_t payload[plen - sizeof (struct udphdr)]; | ||
| 104 | + uint8_t *payload; | ||
| 105 | } packet; | ||
| 106 | memset (&packet, 0, plen); | ||
| 107 | + packet.payload = malloc(plen - sizeof (struct udphdr)); | ||
| 108 | |||
| 109 | (void)n; | ||
| 110 | packet.uh.uh_sport = sport; | ||
| 111 | @@ -61,7 +62,9 @@ send_udp_probe (int fd, unsigned ttl, unsigned n, size_t plen, uint16_t port) | ||
| 112 | /*if (plen > sizeof (struct udphdr)) | ||
| 113 | packet.payload[0] = (uint8_t)ttl;*/ | ||
| 114 | |||
| 115 | - return send_payload (fd, &packet, plen, ttl); | ||
| 116 | + ssize_t ret = send_payload (fd, &packet, plen, ttl); | ||
| 117 | + free(packet.payload); | ||
| 118 | + return ret; | ||
| 119 | } | ||
| 120 | |||
| 121 | |||
| 122 | -- | ||
| 123 | 2.14.1 | ||
| 124 | |||
diff --git a/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch b/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch deleted file mode 100644 index 3cc2ba80c2..0000000000 --- a/meta-networking/recipes-support/ndisc6/ndisc6/0002-Do-not-undef-_GNU_SOURCE.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From 2a50154fbce38fd36be7e14f5cd4a8b03c65c72f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 31 Aug 2017 11:15:37 -0700 | ||
| 4 | Subject: [PATCH 2/2] Do not undef _GNU_SOURCE | ||
| 5 | |||
| 6 | There are functions from tcp.h which are under _GNU_SOURCE | ||
| 7 | in musl | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | src/trace-tcp.c | 1 - | ||
| 14 | 1 file changed, 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/src/trace-tcp.c b/src/trace-tcp.c | ||
| 17 | index 62d22ff..380008e 100644 | ||
| 18 | --- a/src/trace-tcp.c | ||
| 19 | +++ b/src/trace-tcp.c | ||
| 20 | @@ -21,7 +21,6 @@ | ||
| 21 | # include <config.h> | ||
| 22 | #endif | ||
| 23 | |||
| 24 | -#undef _GNU_SOURCE | ||
| 25 | #define _DEFAULT_SOURCE 1 | ||
| 26 | |||
| 27 | #include <string.h> | ||
| 28 | -- | ||
| 29 | 2.14.1 | ||
| 30 | |||
diff --git a/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/meta-networking/recipes-support/ndisc6/ndisc6_git.bb index d1e006c08f..037d929b66 100644 --- a/meta-networking/recipes-support/ndisc6/ndisc6_git.bb +++ b/meta-networking/recipes-support/ndisc6/ndisc6_git.bb | |||
| @@ -5,11 +5,9 @@ HOMEPAGE = "http://www.remlab.net/ndisc6/" | |||
| 5 | LICENSE = "GPL-2.0" | 5 | LICENSE = "GPL-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 7 | 7 | ||
| 8 | PV = "1.0.4+git${SRCPV}" | 8 | PV = "1.0.5" |
| 9 | SRCREV = "4c794b5512d23c649def1f94a684225dcbb6ac3e" | 9 | SRCREV = "b706f5f01aa82aa0db678fffd15a1527f330c507" |
| 10 | SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \ | 10 | SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \ |
| 11 | file://0001-replace-VLAIS-with-malloc-free-pair.patch \ | ||
| 12 | file://0002-Do-not-undef-_GNU_SOURCE.patch \ | ||
| 13 | file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \ | 11 | file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \ |
| 14 | " | 12 | " |
| 15 | 13 | ||
