Waybar
Waybar copied to clipboard
[BUG `waybar-network`] Enforcing `interface` causes `{gwaddr}` to be empty
Case 1
config
"network#wifi": {
"interface": "wl*"
"format-wifi": "{gwaddr}",
}
result
module is empty
debug log (network-relevant entries only)
[2022-05-21 13:27:25.066] [debug] network: selecting new interface wlp3s0/3
[2022-05-21 13:27:25.066] [debug] network: wlp3s0, new addr aaa.bbb.ccc.ddd/24
Case 2
config
"network#wifi": {
"format-wifi": "{gwaddr}",
}
result
module contains gateway address
debug log (network-relevant entries only)
[2022-05-21 13:28:08.345] [debug] network: new default route via aaa.bbb.ccc.xxx on if3 metric 3003
[2022-05-21 13:27:25.066] [debug] network: wlp3s0, new addr aaa.bbb.ccc.ddd/24
NOTE
In the logs, I have replaced the actual IP address with aaa.bbb.ccc.ddd
and aaa.bbb.ccc.xxx
Diagnosis
- If
interface
is set in the config, thenconfig_["interface"].isString()
is true. - When
config_["interface"].isString()
is true, the module never setswant_route_dump_ = true;
- so
askForStateDump()
never asks for a route dump - so
handleEvents()
never receives aRTM_NEWROUTE
message - and so it never sets
net->gwaddr_
- and therefore,
gwaddr_
remains unset.
Should be better with a4d27ea
Nope, still not fixed.
Same for me.
Still happening with waybar 0.9.24.