Summary
Follow-up from PR #1068 review (@PeterJhongLinksys). Non-blocking / low impact.
FirmwareUpdateNotifier.buildOtaCheckParams (firmware_update_notifier.dart:92) dropped the legacy if (masterNode == null) return null guard during the MeshNetwork migration.
devicesData.master is now always non-null — the builder synthesizes a MasterNode(deviceId: 'GATEWAY', ...) when no master/systemInfo is available. So in a degenerate state (no Hosts master resolved) the OTA check no longer short-circuits; instead it proceeds with:
macAddress: _formatMacAddress('GATEWAY') → a bogus MAC (GATEWAY)
- empty
installedVersion / modelNumber
final master = devicesData.master; // synthetic 'GATEWAY' fallback, never null
...
return FirmwareOtaCheckParams(
macAddress: _formatMacAddress(master.deviceId), // 'GATEWAY' → 'GATEWAY'
installedVersion: master.softwareVersion, // '' in degenerate case
modelNumber: master.model, // '' in degenerate case
...
);
Impact
Low — real routers always have a Hosts master, so this only manifests in a degenerate/transient state. But an OTA check firing with a bogus MAC + empty version/model is worse than being skipped.
Suggested fix
Re-introduce a guard: return null when the master is the synthetic gateway (master.deviceId == 'GATEWAY') or has no hostsDeviceId / empty model, mirroring the legacy skip behavior.
Refs
Summary
Follow-up from PR #1068 review (@PeterJhongLinksys). Non-blocking / low impact.
FirmwareUpdateNotifier.buildOtaCheckParams(firmware_update_notifier.dart:92) dropped the legacyif (masterNode == null) return nullguard during the MeshNetwork migration.devicesData.masteris now always non-null — the builder synthesizes aMasterNode(deviceId: 'GATEWAY', ...)when no master/systemInfo is available. So in a degenerate state (no Hosts master resolved) the OTA check no longer short-circuits; instead it proceeds with:macAddress: _formatMacAddress('GATEWAY')→ a bogus MAC (GATEWAY)installedVersion/modelNumberImpact
Low — real routers always have a Hosts master, so this only manifests in a degenerate/transient state. But an OTA check firing with a bogus MAC + empty version/model is worse than being skipped.
Suggested fix
Re-introduce a guard: return
nullwhen the master is the synthetic gateway (master.deviceId == 'GATEWAY') or has nohostsDeviceId/ emptymodel, mirroring the legacy skip behavior.Refs