From d61aefe2fc4d8549f459bdfc2749c9f163449ebc Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 17:23:32 +0200 Subject: Replace libowfat's ip scanner and formatters with own own --- ot_livesync.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ot_livesync.c') diff --git a/ot_livesync.c b/ot_livesync.c index c4dc6e5..f6bb28b 100644 --- a/ot_livesync.c +++ b/ot_livesync.c @@ -13,11 +13,11 @@ #include /* Libowfat */ -#include "ip6.h" #include "socket.h" /* Opentracker */ #include "ot_accesslist.h" +#include "ot_ip.h" #include "ot_livesync.h" #include "ot_mutex.h" #include "ot_stats.h" @@ -92,7 +92,7 @@ void livesync_bind_mcast(ot_ip6 ip, uint16_t port) { char tmpip[4] = {0, 0, 0, 0}; char *v4ip; - if (!ip6_isv4mapped(ip)) + if (!ip_is_v4mapped(ip)) exerr("v6 mcast support not yet available."); v4ip = ip + 12; @@ -140,14 +140,14 @@ static void livesync_handle_peersync(struct ot_workstruct *ws, size_t peer_size) /* Prepare peer record for v4mapped expansion */ if (peer_size == OT_PEER_SIZE4) - memcpy(&ws->peer, V4mappedprefix, sizeof(V4mappedprefix)); + memcpy(&ws->peer, ip_v4mapped_prefix, sizeof(ip_v4mapped_prefix)); /* Now basic sanity checks have been done on the live sync packet We might add more testing and logging. */ while ((ssize_t)(off + sizeof(ot_hash) + peer_size) <= ws->request_size) { char *peer_ip = ws->request + off + sizeof(ot_hash); if (peer_size == OT_PEER_SIZE4) - memcpy(&ws->peer[0] + sizeof(V4mappedprefix), peer_ip, peer_size); + memcpy(&ws->peer[0] + sizeof(ip_v4mapped_prefix), peer_ip, peer_size); else memcpy(&ws->peer, peer_ip, peer_size); ws->hash = (ot_hash *)(ws->request + off); @@ -215,7 +215,7 @@ static void *livesync_worker(void *args) { ws.inbuf = ws.request = malloc(LIVESYNC_INCOMING_BUFFSIZE); ws.outbuf = ws.reply = 0; - memcpy(in_ip, V4mappedprefix, sizeof(V4mappedprefix)); + memcpy(in_ip, ip_v4mapped_prefix, sizeof(ip_v4mapped_prefix)); while (1) { uint32_t packet_type; -- cgit v1.3