Skip to content
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

Add check_status on UPnP device, rework how to detect if there is an UPnP device #2063

Open
wants to merge 2 commits into
base: fix_upnp
Choose a base branch
from

Conversation

kay0u
Copy link
Member

@kay0u kay0u commented Mar 6, 2025

The problem

...

Solution

...

PR Status

Tested on my prod lul

How to test

...

@@ -189,7 +189,10 @@ class YunoUPnP:
def __init__(self, firewall: "YunoFirewall") -> None:
self.firewall = firewall
self.description = "Yunohost firewall"
self.upnpc: miniupnpc.UPnP | None = None
self.upnpc = miniupnpc.UPnP()
self.upnpc.localport = self.UPNP_PORT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we define a port here, it works with the default one.

Comment on lines 203 to 204
def ensure_listen_port(self) -> None:
self.firewall.open_port("udp", self.UPNP_PORT, self.UPNP_PORT_COMMENT)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is never called, I think we can remove it?

Copy link
Member

@alexAubin alexAubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review, LGTM

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.

2 participants