mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
network: fix missing break in switch statement
This can cause the first character of the string to be read as an iface state. Fixes https://codeberg.org/dnkl/yambar/issues/377
This commit is contained in:
parent
6f3952819f
commit
547cef5afb
2 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,12 @@
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* network: fix missing break in switch statement([#377][377])
|
||||||
|
|
||||||
|
[377]: https://codeberg.org/dnkl/yambar/issues/377
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
|
|
|
@ -595,6 +595,7 @@ handle_link(struct module *mod, uint16_t type, const struct ifinfomsg *msg, size
|
||||||
iface->name = strdup((const char *)RTA_DATA(attr));
|
iface->name = strdup((const char *)RTA_DATA(attr));
|
||||||
LOG_DBG("%s: index=%d", iface->name, iface->index);
|
LOG_DBG("%s: index=%d", iface->name, iface->index);
|
||||||
mtx_unlock(&mod->lock);
|
mtx_unlock(&mod->lock);
|
||||||
|
break;
|
||||||
case IFLA_OPERSTATE: {
|
case IFLA_OPERSTATE: {
|
||||||
uint8_t operstate = *(const uint8_t *)RTA_DATA(attr);
|
uint8_t operstate = *(const uint8_t *)RTA_DATA(attr);
|
||||||
if (iface->state == operstate)
|
if (iface->state == operstate)
|
||||||
|
|
Loading…
Add table
Reference in a new issue