/sys/class/net/<if>/speed reports -1 with no carrier. Reading it into a uint32_t wrapped to 4294967295 (without setting failbit), so {linkSpeed} showed an absurd value. Read into int64_t, check fail(), and treat negative or failed reads as 0.
module