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

[enh] Improve upnp support #542

Merged
merged 1 commit into from Dec 2, 2018
Merged

Conversation

zamentur
Copy link
Member

@zamentur zamentur commented Sep 14, 2018

The problem

https://forum.yunohost.org/t/work-around-router-upnp-shortcomming-implementations-netgear-cbvg834g/5730

Solution

teajay-fr suggest to increase discover time and listen on 1900 to support some router that doesn't respond to discover query

Note: i don't know if it's solution increase the postinstall time ?

PR Status

Need Feedback, i don't know if it's a good idea

How to test

...

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@Psycojoker
Copy link
Member

Has anyone tested that? I don't have this kind of configuration here.

@alexAubin
Copy link
Member

I don't have any way to test that either, or any experience with Upnp :/ ...

We could blindly merge this though, that sounds relatively safe ? Idk...

@teajay-fr
Copy link

This probably won't help in assessing the usefullness of this approach since I came up with it :)
I can just testify that I got my netgear CBVG834G to accept the UPNP updates using this trick.
For routers that correctly implement the UPNP protocol, this should not have any drawback.

@zamentur
Copy link
Member Author

I suggest we add this in a testing and see if upnp still works

@zamentur zamentur added this to the 3.4.x milestone Nov 30, 2018
@alexAubin alexAubin merged commit 640bc49 into stretch-unstable Dec 2, 2018
@alexAubin alexAubin deleted the enh-improve-support-upnp branch December 2, 2018 01:43
@kay0u
Copy link
Member

kay0u commented Dec 23, 2018

Hi, I had this error:

yunohost firewall allow --no-upnp TCP 8080

2018-12-22 16:06:05,411: DEBUG - Traceback (most recent call last):
2018-12-22 16:06:05,411: DEBUG -   File "/usr/bin/yunohost", line 213, in <module>
2018-12-22 16:06:05,412: DEBUG -     timeout=opts.timeout,
2018-12-22 16:06:05,412: DEBUG -   File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 136, in cli
2018-12-22 16:06:05,412: DEBUG -     moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
2018-12-22 16:06:05,412: DEBUG -   File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 425, in run
2018-12-22 16:06:05,412: DEBUG -     ret = self.actionsmap.process(args, timeout=timeout)
2018-12-22 16:06:05,412: DEBUG -   File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 523, in process
2018-12-22 16:06:05,413: DEBUG -     return func(**arguments)
2018-12-22 16:06:05,413: DEBUG -   File "/usr/lib/moulinette/yunohost/firewall.py", line 94, in firewall_allow
2018-12-22 16:06:05,413: DEBUG -     return firewall_reload()
2018-12-22 16:06:05,413: DEBUG -   File "/usr/lib/moulinette/yunohost/firewall.py", line 209, in firewall_reload
2018-12-22 16:06:05,413: DEBUG -     upnp = firewall_upnp()['enabled'] if not skip_upnp else False
2018-12-22 16:06:05,414: DEBUG -   File "/usr/lib/moulinette/yunohost/firewall.py", line 346, in firewall_upnp
2018-12-22 16:06:05,414: DEBUG -     upnpc.localport = 1900
2018-12-22 16:06:05,414: DEBUG - AttributeError: 'miniupnpc.UPnP' object has no attribute 'localport'

I'm not sure what I have done, but now this is working... If I found something on this error, i'll come back to you

alexAubin added a commit that referenced this pull request Jan 8, 2019
@alexAubin
Copy link
Member

Okay guys, this is still broken (encountered the error on a fresh install in 3.4) so I reverted 640bc49 for now ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants