Iwinfo assoclist bug?

I'm calling the "iwinfo" utility using the ubus RPC.

This is the json object I'm using to call:

{
        "jsonrpc": "2.0",
        "method": "call",
        "params": [
            token_here,
            "iwinfo",
            "assoclist",
            {
                device: "phy1-ap0"
            }
        ]
}

phy1-ap0 is my 5GHz Wifi interface.

Most of the time I get the exact data that I need, which looks somewhat like this:

{
          "mac": "52:21:97:49:49:99",
          "signal": -32,
          "signal_avg": -32,
          "noise": -89,
          "inactive": 230,
          "connected_time": 85,
          "thr": 0,
          "authorized": true,
          "authenticated": true,
          "preamble": "short",
          "wme": true,
          "mfp": false,
          "tdls": false,
          "mesh llid": 0,
          "mesh plid": 0,
          "mesh plink": "",
          "mesh local PS": "",
          "mesh peer PS": "",
          "mesh non-peer PS": "",
          "rx": {
            "drop_misc": 4,
            "packets": 22602,
            "bytes": 1572460,
            "ht": false,
            "vht": false,
            "he": false,
            "mhz": 20,
            "rate": 24000
          },
          "tx": {
            "failed": 1,
            "retries": 0,
            "packets": 121691,
            "bytes": 183822979,
            "ht": false,
            "vht": false,
            "he": true,
            "mhz": 20,
            "rate": 137600,
            "mcs": 5,
            "nss": 2,
            "he_gi": 0,
            "he_dcm": 0
          }
}

But the issue is that sometimes in the "rx" or "tx" object, the "bytes" property sometimes has large negative values instead of "positive" bytes. I'm unable to reproduce it reliably but I do know it happens.

Does anyone else have similar issues?

probably a 32 bit integer overflow at 2^31 bytes, +2GB continues as -2GB+1
Likely harmless, but annoying

Can confirm, the bug does happen for >2GB

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.