mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/odhcp6c: bump version to git 10a52220ae
f19dd37fb4...10a52220ae
Removed patches which are included in this release.
Please note that upstream committed
https://git.openwrt.org/project/odhcp6c/commit/?id=10a52220aec9d45803518d8cc4d63e552484ed61
instead of patch 0001.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
138713f39a
commit
92abb11ee4
@@ -1,102 +0,0 @@
|
|||||||
From 3b69378125aba61b3391bf5fe607983ce75b839c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Rosen Penev <rosenp@gmail.com>
|
|
||||||
Date: Wed, 8 Apr 2026 14:14:56 -0700
|
|
||||||
Subject: [PATCH] odhcp6c: const cast for c23 compatibility
|
|
||||||
|
|
||||||
strpbrk is now a macro that returns const based on the parameter. Cast
|
|
||||||
it away when we don't want const.
|
|
||||||
|
|
||||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
||||||
|
|
||||||
Upstream: https://github.com/openwrt/odhcp6c/pull/156
|
|
||||||
|
|
||||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
||||||
---
|
|
||||||
src/config.c | 18 +++++++++---------
|
|
||||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/config.c b/src/config.c
|
|
||||||
index 54e2d35..c1a3a99 100644
|
|
||||||
--- a/src/config.c
|
|
||||||
+++ b/src/config.c
|
|
||||||
@@ -338,7 +338,7 @@ static int config_parse_opt_u8(const char *src, uint8_t **dst)
|
|
||||||
static int config_parse_opt_string(const char *src, uint8_t **dst, const bool array)
|
|
||||||
{
|
|
||||||
int o_len = 0;
|
|
||||||
- char *sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ char *sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
|
|
||||||
if (sep && !array)
|
|
||||||
return -1;
|
|
||||||
@@ -362,7 +362,7 @@ static int config_parse_opt_string(const char *src, uint8_t **dst, const bool ar
|
|
||||||
src = sep;
|
|
||||||
|
|
||||||
if (sep)
|
|
||||||
- sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
} while (src);
|
|
||||||
|
|
||||||
return o_len;
|
|
||||||
@@ -371,7 +371,7 @@ static int config_parse_opt_string(const char *src, uint8_t **dst, const bool ar
|
|
||||||
static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const bool array)
|
|
||||||
{
|
|
||||||
int o_len = 0;
|
|
||||||
- char *sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ char *sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
|
|
||||||
if (sep && !array)
|
|
||||||
return -1;
|
|
||||||
@@ -399,7 +399,7 @@ static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const boo
|
|
||||||
src = sep;
|
|
||||||
|
|
||||||
if (sep)
|
|
||||||
- sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
} while (src);
|
|
||||||
|
|
||||||
return o_len;
|
|
||||||
@@ -408,7 +408,7 @@ static int config_parse_opt_dns_string(const char *src, uint8_t **dst, const boo
|
|
||||||
static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array)
|
|
||||||
{
|
|
||||||
int o_len = 0;
|
|
||||||
- char *sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ char *sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
|
|
||||||
if (sep && !array)
|
|
||||||
return -1;
|
|
||||||
@@ -433,7 +433,7 @@ static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array
|
|
||||||
src = sep;
|
|
||||||
|
|
||||||
if (sep)
|
|
||||||
- sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
} while (src);
|
|
||||||
|
|
||||||
return o_len;
|
|
||||||
@@ -442,7 +442,7 @@ static int config_parse_opt_ip6(const char *src, uint8_t **dst, const bool array
|
|
||||||
static int config_parse_opt_user_class(const char *src, uint8_t **dst, const bool array)
|
|
||||||
{
|
|
||||||
int o_len = 0;
|
|
||||||
- char *sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ char *sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
|
|
||||||
if (sep && !array)
|
|
||||||
return -1;
|
|
||||||
@@ -471,7 +471,7 @@ static int config_parse_opt_user_class(const char *src, uint8_t **dst, const boo
|
|
||||||
src = sep;
|
|
||||||
|
|
||||||
if (sep)
|
|
||||||
- sep = strpbrk(src, ARRAY_SEP);
|
|
||||||
+ sep = strpbrk((char*)src, ARRAY_SEP);
|
|
||||||
} while (src);
|
|
||||||
|
|
||||||
return o_len;
|
|
||||||
@@ -555,7 +555,7 @@ int config_parse_opt(const char *opt)
|
|
||||||
struct odhcp6c_opt *dopt = NULL;
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
- data = strpbrk(opt, ":");
|
|
||||||
+ data = strpbrk((char*)opt, ":");
|
|
||||||
if (!data)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
From 9a4d6fe802d21e4fc1b84f7d55b5c3c23e71d6ba Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Donald <newtwen+github@gmail.com>
|
|
||||||
Date: Thu, 18 Dec 2025 15:10:24 +0100
|
|
||||||
Subject: [PATCH] dhcpv6: use stable IAID for IA_NA
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
https://www.rfc-editor.org/rfc/rfc8415.html#section-12
|
|
||||||
|
|
||||||
........ The IAID is chosen by the client. For any given use of an
|
|
||||||
IA by the client, the IAID for that IA MUST be consistent across
|
|
||||||
restarts of the DHCP client. The client may maintain consistency by
|
|
||||||
either storing the IAID in non-volatile storage or using an algorithm
|
|
||||||
that will consistently produce the same IAID as long as the
|
|
||||||
configuration of the client has not changed.
|
|
||||||
|
|
||||||
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
|
|
||||||
Link: https://github.com/openwrt/odhcp6c/pull/140
|
|
||||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
||||||
|
|
||||||
Upstream: https://github.com/openwrt/odhcp6c/commit/9a4d6fe802d21e4fc1b84f7d55b5c3c23e71d6ba
|
|
||||||
|
|
||||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
||||||
---
|
|
||||||
src/dhcpv6.c | 15 +++++++++++++--
|
|
||||||
src/odhcp6c.h | 1 +
|
|
||||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
|
|
||||||
index d8bb8be..97860b1 100644
|
|
||||||
--- a/src/dhcpv6.c
|
|
||||||
+++ b/src/dhcpv6.c
|
|
||||||
@@ -262,6 +262,9 @@ static struct dhcpv6_stats dhcpv6_stats = {0};
|
|
||||||
// config
|
|
||||||
static struct config_dhcp* config_dhcp = NULL;
|
|
||||||
|
|
||||||
+// store unique ifname hash to use as IA->IAID
|
|
||||||
+static uint32_t ifname_hash_iaid = 0;
|
|
||||||
+
|
|
||||||
static uint32_t ntohl_unaligned(const uint8_t *data)
|
|
||||||
{
|
|
||||||
uint32_t buf;
|
|
||||||
@@ -542,6 +545,12 @@ void dhcpv6_reset_stats(void)
|
|
||||||
memset(&dhcpv6_stats, 0, sizeof(dhcpv6_stats));
|
|
||||||
}
|
|
||||||
|
|
||||||
+uint32_t hash_ifname(const char *s) {
|
|
||||||
+ uint32_t h = 0;
|
|
||||||
+ while (*s) h = h * 31 + *s++;
|
|
||||||
+ return h;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
int init_dhcpv6(const char *ifname)
|
|
||||||
{
|
|
||||||
config_dhcp = config_dhcp_get();
|
|
||||||
@@ -566,6 +575,8 @@ int init_dhcpv6(const char *ifname)
|
|
||||||
if (ioctl(sock, SIOCGIFINDEX, &ifr) < 0)
|
|
||||||
goto failure;
|
|
||||||
|
|
||||||
+ ifname_hash_iaid = hash_ifname(ifname);
|
|
||||||
+
|
|
||||||
ifindex = ifr.ifr_ifindex;
|
|
||||||
|
|
||||||
// Set the socket to non-blocking mode
|
|
||||||
@@ -838,7 +849,7 @@ static void dhcpv6_send(enum dhcpv6_msg req_msg_type, uint8_t trid[3], uint32_t
|
|
||||||
struct dhcpv6_ia_hdr hdr_ia_na = {
|
|
||||||
.type = htons(DHCPV6_OPT_IA_NA),
|
|
||||||
.len = htons(sizeof(hdr_ia_na) - DHCPV6_OPT_HDR_SIZE),
|
|
||||||
- .iaid = htonl(ifindex),
|
|
||||||
+ .iaid = htonl(ifname_hash_iaid),
|
|
||||||
.t1 = 0,
|
|
||||||
.t2 = 0,
|
|
||||||
};
|
|
||||||
@@ -1392,7 +1403,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _o_unused const int rc,
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Test ID
|
|
||||||
- if (ia_hdr->iaid != htonl(ifindex) && otype == DHCPV6_OPT_IA_NA)
|
|
||||||
+ if (ia_hdr->iaid != htonl(ifname_hash_iaid) && otype == DHCPV6_OPT_IA_NA)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
uint16_t code = DHCPV6_Success;
|
|
||||||
diff --git a/src/odhcp6c.h b/src/odhcp6c.h
|
|
||||||
index aa73bbc..c57f885 100644
|
|
||||||
--- a/src/odhcp6c.h
|
|
||||||
+++ b/src/odhcp6c.h
|
|
||||||
@@ -540,6 +540,7 @@ struct odhcp6c_opt {
|
|
||||||
const char *str;
|
|
||||||
};
|
|
||||||
|
|
||||||
+uint32_t hash_ifname(const char *s);
|
|
||||||
int init_dhcpv6(const char *ifname);
|
|
||||||
int dhcpv6_get_ia_mode(void);
|
|
||||||
int dhcpv6_promote_server_cand(void);
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# Locally computed
|
# Locally computed
|
||||||
sha256 e9cfddfcc12c4ca0bf8d8211bb72c7018c0e0f8da6903d680da122b4ce551c56 odhcp6c-f19dd37fb467c9cf10cad57aefa0d048312d7dfd-git4.tar.gz
|
sha256 d2f48c57adbe2c2304ca7a8900429797e46267c6f2e376ac0166fceb85095847 odhcp6c-10a52220aec9d45803518d8cc4d63e552484ed61-git4.tar.gz
|
||||||
sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
|
sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
ODHCP6C_VERSION = f19dd37fb467c9cf10cad57aefa0d048312d7dfd
|
ODHCP6C_VERSION = 10a52220aec9d45803518d8cc4d63e552484ed61
|
||||||
ODHCP6C_SITE = https://git.openwrt.org/project/odhcp6c.git
|
ODHCP6C_SITE = https://git.openwrt.org/project/odhcp6c.git
|
||||||
ODHCP6C_SITE_METHOD = git
|
ODHCP6C_SITE_METHOD = git
|
||||||
ODHCP6C_LICENSE = GPL-2.0
|
ODHCP6C_LICENSE = GPL-2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user