Skip to content

Fix Ethernet devices unable to discover others#255

Open
OninDynamics wants to merge 1 commit into
linuxmint:masterfrom
OninDynamics:onind
Open

Fix Ethernet devices unable to discover others#255
OninDynamics wants to merge 1 commit into
linuxmint:masterfrom
OninDynamics:onind

Conversation

@OninDynamics

@OninDynamics OninDynamics commented Jun 7, 2026

Copy link
Copy Markdown

On my machine connected via Ethernet, Warpinator silently breaks and discovery stops working (Shows "No other computers found..."), and running warpinator shows a KeyError in src/networkmonitor.py:

Traceback (most recent call last):

  [earlier calls omitted...]

  File "/usr/lib/warpinator/server.py", line 199, in add_service
    if not self.netmon.same_subnet(remote_ip_info):
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib/warpinator/networkmonitor.py", line 170, in same_subnet
    self.current_ip_info.ip4["netmask"]))
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'netmask'

Apparently, in networkmonitor.py, self.current_ip_info.ip4 can contain a mask key instead of netmask, breaking the device discovery functionality. Manual connections still work, though.

This PR (very crudely) fixes this by allowing either "mask" or "netmask" as the key name as discussed in my comment in #220

Do note that this is the first time I've touched Python, and I might have missed something important. It is possible the correct fix could be somewhere else (maybe how netifaces returns interface info), so feedback is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant