summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-08-27 09:14:05 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-10-06 02:18:41 +0300
commitd8084108cc750962dafcd3716f5d243de2e56418 (patch)
tree0264d8afbb41d018df4de56be870d2658def3b14 /accel-pppd/ipv6
parent2600050acd74bf6cea320e8d5f3c7ae09568b062 (diff)
downloadaccel-ppp-d8084108cc750962dafcd3716f5d243de2e56418.tar.gz
accel-ppp-d8084108cc750962dafcd3716f5d243de2e56418.zip
ipv6: use a dedicated type for per-session DNS
DNS-Server-IPv6-Address carries a full IPv6 address, so storing it in ipv6db_addr_t also carried an unused prefix length and flags. Introduce dedicated DNS list and address types so the representation matches the data. Suggested-by: Vladislav Grishenko <566150+themiron@users.noreply.github.com> Link: https://github.com/accel-ppp/accel-ppp/commit/4f562467dbdf819395e138617c2a057e02595b9e#r197215804
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/ipv6_dns_test.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/accel-pppd/ipv6/ipv6_dns_test.c b/accel-pppd/ipv6/ipv6_dns_test.c
index 72b4751c..9452e5a1 100644
--- a/accel-pppd/ipv6/ipv6_dns_test.c
+++ b/accel-pppd/ipv6/ipv6_dns_test.c
@@ -44,15 +44,14 @@ static int is(const struct in6_addr *addr, const char *str)
static struct ap_session *session_with(const char **str, int count)
{
struct ap_session *ses = calloc(1, sizeof(*ses));
- struct ipv6db_item_t *item = calloc(1, sizeof(*item));
+ struct ipv6_dns_t *item = calloc(1, sizeof(*item));
int i;
INIT_LIST_HEAD(&item->addr_list);
for (i = 0; i < count; i++) {
- struct ipv6db_addr_t *a = calloc(1, sizeof(*a));
+ struct ipv6_dns_addr_t *a = calloc(1, sizeof(*a));
a->addr = a6(str[i]);
- a->prefix_len = 128;
list_add_tail(&a->entry, &item->addr_list);
}
@@ -65,7 +64,7 @@ static void session_free(struct ap_session *ses)
{
if (ses->ipv6_dns) {
while (!list_empty(&ses->ipv6_dns->addr_list)) {
- struct ipv6db_addr_t *a = list_entry(ses->ipv6_dns->addr_list.next,
+ struct ipv6_dns_addr_t *a = list_entry(ses->ipv6_dns->addr_list.next,
typeof(*a), entry);
list_del(&a->entry);