head 1.2; access; symbols pkgsrc-2026Q3:1.1.0.2 pkgsrc-2026Q3-base:1.1; locks; strict; comment @ * @; 1.2 date 2026.10.09.17.50.25; author drixter; state dead; branches; next 1.1; commitid HkL60MdBZjhpqPYG; 1.1 date 2026.09.11.12.53.13; author drixter; state Exp; branches; next ; commitid ZQGdhSeScFK6GcVG; desc @@ 1.2 log @knot: Update to 3.6.1 Features: mod-ecs: new module for setting the ECS scope prefix length (Thanks to Branko Mijuskovic) Improvements: knotd: additional SOA consistency checks when processing incoming XFR knotd: DDNS over 0-RTT QUIC/TLS is forbidden knotd: new warning if difference(-no-serial) is enabled on a secondary zone knotc: control blocking timeout is per full command, not per each zone kdig: backward compatibility for +noidn as an alias for +noidnout libknot: extra checks for malformed IPv4 and TCP packets in XDP filter (Thanks to Joshua Rogers) src,tests: various compatibility fixes for SmartOS #980 doc: various improvements Bugfixes: knotd: missing synchronization between catalog reload and worker suspension knotd: race condition between pausing/resuming events, zonedb update, and reload/conf-commit knotd: non-consumed DoT 0-RTT early data can cause memory exhaustion (Thanks to Yuxiao Wu) knotd: server can crash if NSEC3-enabled zone has empty NSEC3 chain (Thanks to Yuxiao Wu) knotd: server sends 3 session tickets over DoQ knotd: missing checks for malformed sentinel-related replies from Redis (Thanks to Joshua Rogers) knotd: defective error handling during zone update (Thanks to Joshua Rogers) knotd: defective TSIG MAC truncation processing (Thanks to Joshua Rogers) knotd: zone update commit reads parent zone contents without RCU protection (Thanks to Joshua Rogers) knotd: parent-check TTL can overflow KSK retirement delay (Thanks to Joshua Rogers) knotd: missing DDNS queue synchronization during reload (Thanks to Joshua Rogers) keymgr: validate-skr returns success for cryptographically invalid SKR signatures (Thanks to Joshua Rogers) kdig: missing check for malformed EDNS/REPORTCHANNEL data (Thanks to Joshua Rogers) libknot: defective output buffer handling in TCP over XDP libknot: auto-generated TLS key file follows symlinks (Thanks to Joshua Rogers) libknot: missing checks for malformed data in rrset-dump (Thanks to Joshua Rogers) libzsanner: possible out-of-bounds write when parsing DELEG/DELEGPARAM dname (Thanks to Joshua Rogers) redis: possible use-after-free when rrset index update fails (Thanks to Joshua Rogers) redis: incorrect arity check for KNOT_BIN.UPD.LOAD (Thanks to Joshua Rogers) redis: KNOT.ZONE.INFO crashes on nonexistent zone (Thanks to Joshua Rogers) redis: update commit uses freed zset element buffer while applying updates (Thanks to Joshua Rogers) python: receive_block() doesn't return data from the 'status' command @ text @$NetBSD: patch-src_contrib_time.c,v 1.1 2026/09/11 12:53:13 drixter Exp $ Patch from upstream to work on SmartOS #980 --- src/contrib/time.c.orig 2026-09-10 16:32:13.079142881 +0000 +++ src/contrib/time.c @@@@ -15,6 +15,19 @@@@ #include "contrib/ctype.h" #include "contrib/string.h" + +static long get_gmtoff(const struct tm *tm) +{ +#ifdef __sun + return (tm->tm_isdst > 0) ? -altzone : -timezone; +#else + return tm->tm_gmtoff; +#endif +} + + + + struct timespec time_now(void) { struct timespec result = { 0 }; @@@@ -422,11 +435,17 @@@@ int knot_time_print(knot_time_print_t fo return -1; } tt = (time_t)time; - ret = (localtime_r(&tt, <) == NULL ? -1 : - snprintf_check(dst, dst_len, "%04d-%02d-%02dT%02d:%02d:%02d%+03ld:%02d", - lt.tm_year + 1900, lt.tm_mon + 1, lt.tm_mday, - lt.tm_hour, lt.tm_min, lt.tm_sec, - lt.tm_gmtoff / 3600, abs((int)(lt.tm_gmtoff / 60)) % 60)); + + ret = localtime_r(&tt, <) == NULL ? -1 : 0; + if (ret >= 0) { + int gmtoff_min = abs((int)(get_gmtoff(<) / 60)) % 60; + ret = snprintf_check(dst, dst_len, "%04d-%02d-%02dT%02d:%02d:%02d%+03ld:%02d", + lt.tm_year + 1900, lt.tm_mon + 1, lt.tm_mday, + lt.tm_hour, lt.tm_min, lt.tm_sec, + get_gmtoff(<) / 3600, gmtoff_min); + } + + return (ret > 0 ? 0 : -1); case TIME_PRINT_RELSEC: ret = snprintf(dst, dst_len, "%+"KNOT_TIMEDIFF_PRINTF, @@@@ -476,12 +495,12 @@@@ int knot_time_print_ex(knot_time_print_t tt = (time_t)time; ret = localtime_r(&tt, <) == NULL ? -1 : 0; if (ret >= 0) { - int gmtoff_min = abs((int)(lt.tm_gmtoff / 60)) % 60; + int gmtoff_min = abs((int)(get_gmtoff(<) / 60)) % 60; ret = snprintf_check(dst, dst_len, "%04d-%02d-%02dT%02d:%02d:%02d.%03ld%+03ld:%02d%s", lt.tm_year + 1900, lt.tm_mon + 1, lt.tm_mday, lt.tm_hour, lt.tm_min, lt.tm_sec, millis, - lt.tm_gmtoff / 3600, gmtoff_min, suffix); - } + get_gmtoff(<) / 3600, gmtoff_min, suffix); + } return (ret > 0 ? 0 : -1); case TIME_PRINT_RELSEC: ; @ 1.1 log @knot: Patch from upstream to work on SmartOS #980 @ text @d1 1 a1 1 $NetBSD$ @