mORMot2 DailyDaily read of upstream commits

DHCP broadcast routing and shutdown converge across POSIX

This edition is led by a long DHCP sequence: Linux broadcast reception becomes interface-aware, the same packet-info path expands to macOS and NetBSD, and follow-up commits fix scope selection, initialization and shutdown. Socket.IO users also get bounded connection-error handling and a shutdown race fix. Windows consumers should review corrected NetAPI and MSI declarations, while signed-binary builds now fail safely if debug data is embedded after signing.

TL;DR

  • Take the complete DHCP sequence: it fixes interface-aware broadcast reception, scope selection, pool setup and deterministic shutdown.
  • TSocketsIOClient no longer loops forever on namespace connection errors and now waits for reconnect workers during destruction.
  • TDebugFile.SaveToExe refuses signed PE files so embedding debug data cannot silently invalidate Authenticode.

Upgrade advice

Upgrade to the complete edition head, build 2.4.17915, if you run TDhcpServer or TSocketsIOClient; do not cherry-pick an early DHCP refactor without its follow-ups through 2.4.17911. Re-test multihomed DHCP on each supported POSIX target and namespace reconnect failures. Build pipelines using mab must embed before Authenticode signing.

Build2.4.17888 → 2.4.17915
Commits26
Lines+5386 -2213
Read5 min

21 of 21 entries · 26 commits upstream

Stories
# Entry Category Units
1 High Linux DHCP broadcasts are routed through the receiving interface TDhcpServer binds one 0.0.0.0 socket per server port on Linux, receives IP_PKTINFO through new TNetSocketWrap.SetPacketInfo and RecvFromIf methods, and replies with SendToIf on the interface selected by Bind(). TUdpServerThread gains packet-info state. Fixes mormot.net.dhcp+3 2bdf6ddc+318-19

net: fixed TDhcpServer broadcast reception on Linux

Impact

Linux Delphi/FPC DHCP servers can receive 255.255.255.255 traffic and return it on the correct interface instead of the default route; only interfaces registered by Bind are served.

Public API

  • TNetSocketWrap.SetPacketInfoadded
  • TNetSocketWrap.RecvFromIfadded
  • TNetSocketWrap.SendToIfadded

zen010101 · 01:55 UTC · view the commit on GitHub →

2 High DHCP shutdown signals every listener before waiting TDhcpServer.Shutdown detaches its TDhcpServerThread array, terminates every thread first, wakes and waits for each receiver, then frees them. Shutdown becomes idempotent and gains a port-reuse regression test. Fixes mormot.net.dhcp 9929c436+108-17

net: fixed DHCP server shutdown as reported by #735

Impact

Delphi/FPC services can stop or free multi-interface DHCP servers without leaving blocked UDP threads or occupied ports, fixing the reported shutdown failure.

Arnaud Bouchez · 12:56 UTC · PR #735 · view the commit on GitHub →

3 High Debug embedding refuses already signed Windows binaries TDebugFile.SaveToExe detects an Authenticode certificate table in PE files and raises ESynLogException before appending debug data. The mab tool reports the error, and a synthetic signed-PE regression test covers the guard. Fixes mormot.core.log d2a9d037+76-0

core: TDebugFile.SaveToExe() won't silently break an Authenticode signature

Impact

Windows build pipelines can no longer silently invalidate an existing Authenticode signature. Pipelines that embed .mab data after signing now fail and must reverse those steps.

Migration required

Run TDebugFile.SaveToExe or mab before the Authenticode signing step, then sign the final binary.

Public API

  • TDebugFile.SaveToExebehaviour-changed

tf · 09:52 UTC · view the commit on GitHub →

4 High Socket.IO destruction waits for reconnect workers TSocketsIOClient tracks suspended TWebSocketReconnectClientThread instances in fReconnectThreads, blocks new workers during Destroy and terminates and waits for existing workers before freeing client state. Fixes mormot.net.ws.client 41991ab0+44-11

net: fixed potential race at TSocketsIOClient shutdown

Impact

Delphi/FPC Socket.IO clients are protected from a reconnect worker dereferencing an object while it is being destroyed. Normal reconnect behaviour is unchanged.

Arnaud Bouchez · 14:24 UTC · view the commit on GitHub →

5 High Socket.IO namespace failures finish the wait instead of looping TSocketsIOClient.AfterNamespaceConnect now handles sioConnectError by completing wepConnect, logging the response and invoking the new OnNamespaceConnectError callback instead of raising on the WebSocket thread. Fixes mormot.net.ws.client b520475d+31-16

net: enhanced TSocketsIOClient connection errors

Impact

Delphi/FPC clients no longer hang in an infinite namespace-connect loop. Error delivery moves from a worker-thread exception to an optional callback and failed wait result.

Public API

  • TSocketsIOClient.OnNamespaceConnectErroradded

Arnaud Bouchez · 16:38 UTC · view the commit on GitHub →

6 Medium CNG certificate stores include legacy-provider credentials TCryptCertAlgoCng.LoadStore stops filtering certificates whose ProviderType is nonzero, allowing CNG to enumerate credentials backed by legacy CSP providers; LoadPkcs12 remains CNG-only. Fixes mormot.crypt.win+3 030ff667+29-30

crypt: include legacy providers to our CNG list

Impact

Windows Delphi/FPC services can now see legacy-provider certificates through the existing CNG catalog. Very old hardware providers may still fail when CNG uses the key.

Worth a look

Test certificate enumeration and a real signing or TLS operation with each legacy or hardware provider in use.

Public API

  • TCryptCertAlgoCng.LoadStorebehaviour-changed

Arnaud Bouchez · 16:21 UTC · view the commit on GitHub →

7 Medium DHCP pool overlap and empty-interface startup are corrected TDhcpScope.AfterFill fixes the inverted custom-pool overlap comparison and assigns Main.SubPools. TDhcpServer.Bind('') now iterates safely when no matching interface exists instead of entering a repeat loop with zero items. Fixes mormot.net.dhcp+1 f7a5e87a+23-22

net: several DHCP initialization fixes

Impact

Custom DHCP pools are validated correctly, and Delphi/FPC services may start before a network interface appears without an invalid loop; Bind can be retried later.

Arnaud Bouchez · 12:36 UTC · view the commit on GitHub →

8 Medium DHCP scope lookup follows RFC client-state rules TDhcpProcess.FindScope consults ciaddr only for REQUEST, INFORM and RELEASE, while TDhcpServerThread.GetFramePort can return the receiving interface IPv4 into State.RecvIp4 for interface-aware scope selection. Fixes mormot.net.dhcp 282c8626+22-14

net: fixed #717 details against RFC expectations

Impact

DHCP discovery and renewal on multihomed Delphi/FPC servers select the scope from the correct RFC field and receiving interface, reducing wrong-scope replies.

Arnaud Bouchez · 09:33 UTC · PR #717 · view the commit on GitHub →

9 Medium Direct DHCP clients select scope from server and ciaddr fields TDhcpServerThread sets State.RecvIp4 from its bound server address rather than the client's UDP source, and TDhcpProcess.FindScope gives ciaddr precedence for renewing clients when no relay giaddr is present. Fixes mormot.net.dhcp c597021d+21-3

net: fixed TDhcpServer scope selection with no relay

Impact

Requests from a client address outside every configured scope are no longer dropped merely because their UDP source was used for lookup; renewing clients select their own scope.

zen010101 · 10:30 UTC · view the commit on GitHub →

10 Medium DHCP requested-address checks use the active state address TDhcpProcess.RetrieveFrameIP removes an uninitialized local ip4 and consistently uses State.Ip4 for lease comparison, subnet validation, pool lookup, existence checks and logging. Fixes mormot.net.dhcp b46cb366+7-10

net: fixed TDhcpProcess.RetrieveFrameIP

Impact

DHCP REQUEST processing on Delphi/FPC no longer depends on stack garbage when validating a requested IPv4 address, avoiding incorrect rejection or lookup.

Arnaud Bouchez · 16:29 UTC · view the commit on GitHub →

11 Medium MSI product enumeration now imports the real Windows symbol mormot.lib.sspi renames the declared and external import MsiEnumProductA to the Windows API name MsiEnumProductsA. Fixes mormot.lib.sspi 9c10749a+4-4

lib: fixed MsiEnumProductsA() definition name

Impact

Code that referenced the misspelled wrapper must rename it. The corrected import can resolve the actual msi.dll entry point on Windows.

Migration required

Rename MsiEnumProductA references to MsiEnumProductsA.

Public API

  • MsiEnumProductA → MsiEnumProductsArenamed

Arnaud Bouchez · 16:55 UTC · view the commit on GitHub →

12 Medium DHCP interface lookup returns a port only when found TDhcpServerThread.GetFramePort corrects an inverted nil test so a found PDhcpServerInterface yields ClientPort and a missing interface yields zero. Fixes mormot.net.dhcp 8ddfa277+3-3

net: fixed TDhcpServerThread.GetFramePort

Impact

The preceding interface-aware DHCP refactor can now process frames on configured interfaces instead of rejecting them or dereferencing nil.

Arnaud Bouchez · 09:17 UTC · view the commit on GitHub →

13 Medium Packet-info routing expands to macOS and NetBSD HAS_IP_PKTINFO is enabled for Darwin and NetBSD, with native msghdr, cmsghdr and in_pktinfo layouts and platform-specific socket options for SetPacketInfo, RecvFromIf and SendToIf. Delphi Linux compilation is also corrected. New features mormot.defines+2 5ca27eb3+103-57

net: MacOS + NetBSD support of SetPacketInfo/RecvFromIf/SendToIf

Impact

Delphi/FPC DHCP servers on macOS and NetBSD can use interface-aware broadcast reception and replies. FreeBSD and OpenBSD remain outside this implementation.

Worth a look

Run multihomed broadcast tests on each enabled Darwin or NetBSD target.

Arnaud Bouchez · 11:14 UTC · view the commit on GitHub →

14 Medium Windows NetAPI resume handles match their native pointer widths mormot.lib.sspi corrects resumehandle parameters for NetUserEnum, NetGroupEnum, NetLocalGroupEnum and NetLocalGroupGetMembers from pointer-to-pointer declarations to PCardinal or PPtrUInt. Compiler & platform mormot.lib.sspi 6f221cd7+6-6

lib: fixed Windows netapi32.dll API parameters definition

Impact

Existing Delphi/FPC calls that supplied PPCardinal no longer compile unchanged; mORMot itself did not use these parameters. Correct callers now match the Windows ABI.

Worth a look

Compile Windows code that calls these four wrappers and pass a single correctly sized resume value by address.

Public API

  • NetUserEnum / NetGroupEnum / NetLocalGroupEnum / NetLocalGroupGetMemberssignature-changed

Arnaud Bouchez · 17:03 UTC · view the commit on GitHub →

15 Low Secure helpers now raise the common crypto exception In mormot.crypt.secure, TObjectWithPassword, TSynAuthenticationAbstract, TBinaryCookieGenerator and AsnTime now raise ESynCrypto instead of ECrypt outside catalog-specific code. Compiler & platform mormot.crypt.secure bc82aa79+11-11

crypt: use ESynCrypto instead of ECrypto outside of catalog scope

Impact

Delphi and FPC backends that catch ECrypt specifically around these operations must also catch ESynCrypto; successful crypto behaviour is unchanged.

Worth a look

Search exception handlers for ECrypt around these four APIs and widen them if needed.

Public API

  • ESynCryptobehaviour-changed — These secure helpers now raise ESynCrypto where they previously raised ECrypt.

Arnaud Bouchez · 17:39 UTC · view the commit on GitHub →

16 Low DHCP interface routing is separated from non-Linux binding TDhcpServerThread places interface arrays, packet-info binding and frame-port lookup behind DHCP_IFINDEX while retaining per-interface binding and fClientPort on other systems. Under the hood mormot.net.dhcp 73ba52a4+88-36

net: refactored #732 changes

Impact

No standalone application action is appropriate; this intermediate refactor is completed by the immediately following GetFramePort and scope fixes.

Arnaud Bouchez · 09:12 UTC · PR #732 · view the commit on GitHub →

17 Low Peer cache uses an explicit shutdown state THttpPeerCache replaces fSettings=nil shutdown signalling with fShutdown, stops UDP and HTTP servers before freeing settings, and gates callbacks and downloads on that flag. Under the hood mormot.net.server 6661679c+25-25

net: THttpPeerCache shutdown cleanup

Impact

No application-code change is required. Peer-cache teardown is less exposed to background callbacks observing freed settings.

Arnaud Bouchez · 13:27 UTC · view the commit on GitHub →

18 Low A capability flag replaces Linux-only packet-info checks mormot.defines introduces HAS_IP_PKTINFO, and DHCP plus socket implementations use it instead of OSLINUX to select SetPacketInfo, RecvFromIf and SendToIf support. Under the hood mormot.defines+3 42fd010b+20-13

net: introducing HAS_IP_PKTINFO conditional

Impact

No direct application-code change is required. The capability boundary enables later non-Linux POSIX implementations without duplicating DHCP logic.

Arnaud Bouchez · 10:16 UTC · view the commit on GitHub →

19 Low Delphi POSIX socket constants move to the OS layer mormot.core.os.delphi defines IPPROTO_IP with the shared POSIX socket constants, and mormot.net.sock.posix removes its local definition while documenting packet-info support. Under the hood mormot.core.os.delphi+2 e1cd9dec+12-7

net: Delphi POSIX refactoring

Impact

No application-code impact is expected; this keeps Delphi POSIX compilation aligned with the expanded packet-info code.

Arnaud Bouchez · 12:18 UTC · view the commit on GitHub →

20 Low Network tests are aligned with the integrated DHCP code The test suite is adjusted to the latest integrated DHCP and packet-info implementation, refining coverage without changing a published runtime unit. Tests da3cc68e+16-11

tests: refined latest integrated code

Impact

No application-code impact. This is test maintenance for the surrounding network changes.

Arnaud Bouchez · 10:16 UTC · view the commit on GitHub →

21 Low Packet-info tests run on every supported platform The network test conditional is switched to HAS_IP_PKTINFO so the SetPacketInfo, RecvFromIf and SendToIf coverage follows the capability rather than a Linux-only symbol. Tests 6f0395de+6-6

test: cover all HAS_IP_PKTINFO platforms

Impact

No application-code impact. macOS and NetBSD CI can now exercise the packet-info implementation.

Arnaud Bouchez · 12:18 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits1007
Active days49/60
Busiest2026-09-30
Peak60
2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28