New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in main loop #45
Comments
Yeah, there is an apparently wrong assumption in the code that the interface (name) is always known before the index is used. I'll fix that. Although is it strange that the kernel provides information that refers to another information not yet provided... |
@christgau are you currently aware of a temp workaround? |
Yes. The following should solve the problem. diff --git a/src/wsdd.py b/src/wsdd.py
index c91eaa3..71e90f1 100755
--- a/src/wsdd.py
+++ b/src/wsdd.py
@@ -1192,11 +1192,14 @@ class NetlinkAddressMonitor(NetworkAddressMonitor):
offset += ((msg_len + 1) // NLM_HDR_ALIGNTO) * NLM_HDR_ALIGNTO
continue
- iface = self.interfaces[ifa_idx]
- if h_type == self.RTM_NEWADDR:
- self.handle_new_address(addr, ifa_family, iface)
- elif h_type == self.RTM_DELADDR:
- self.handle_deleted_address(addr, ifa_family, iface)
+ if ifa_idx in self.interfaces:
+ iface = self.interfaces[ifa_idx]
+ if h_type == self.RTM_NEWADDR:
+ self.handle_new_address(addr, ifa_family, iface)
+ elif h_type == self.RTM_DELADDR:
+ self.handle_deleted_address(addr, ifa_family, iface)
+ else:
+ logger.debug('unknown interface index: {}'.format(ifa_idx))
offset += ((msg_len + 1) // NLM_HDR_ALIGNTO) * NLM_HDR_ALIGNTO |
Hi, using latest git version (0.6) of wsdd, I'm getting errors (see below, please) although it still works.
After refreshing 'Network' window on Windows 10 machine:
The text was updated successfully, but these errors were encountered: