miniupnpd: Update, revision, new network access control and UCI options… - #24988
miniupnpd: Update, revision, new network access control and UCI options…#24988Self-Hosting-Group wants to merge 0 commit into
Conversation
618ed1f to
6da251a
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
6da251a to
173ee62
Compare
cfbf68e to
cb7a02d
Compare
cc180f0 to
86f6935
Compare
upnpd UCI configuration options and defaultsupnpd UCI config options
|
A downgrade included in a patchset won't get accepted, since a downgrade may subtly reintroducing bugs for existing users, if we assume that point releases fix bugs only. Better to wait for a new release, and bump to that version. Migrations are probably a more serious matter: those must be carried basically 'forever'. The best way is simply to avoid those. One might introduce a new setting, and deprecate the old one, and change the UI over to use the new one. Still a bit of a bumpy road. I think personally this is minor in the grand scheme of things (rather unimportant settings), but other reviewers may take a much firmer stance on it since you are, after all, changing setting names. |
Acceptable. It just breaks compile at the next release bump when it no longer applies. Minor, I guess. |
86f6935 to
124dd12
Compare
|
Every single test-build failed: Dirty patches detected, please refresh and review the diff |
6eaafdb to
50eda40
Compare
in openwrt/packages#24988 Signed-off-by: Self-Hosting-Group <155233284+Self-Hosting-Group@users.noreply.github.com>
in openwrt/packages#24988 Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>
|
@Self-Hosting-Group are you going to squash the commits marked with |
|
I've tried this and it resolves a problem with old mappings hanging around. |
|
If anyone here has a newer Microsoft Xbox (One/Series) console, or knows someone who does, and could log the UPnP IGD traffic for analysis, this would be very helpful in testing if the introduced UPnP IGDv2 compatibility patch would work with the newer consoles as well. I have created a short how-to for logging. How to log UPnP SSDP/SOAP requests, helpful for analysis, from Xbox One/Series X/S (360 tested)
Note: Replace the LAN interface with the correct name. To log only the specific console IPv4 address, replace |
Yes, here, but there are still a few code comments in the dependent LuCI PR for which I would like to see a solution. However, no one has discovered this there yet ;-) I would also like to see a review of the wording there, possibly by @systemcrash? The first commit here, and the first two (merged) from the LuCI PR, have no prerequisites and could be early cherry-picked, and the PRs then left open. With the first commit, we resolve the critical open issue (2 reported) that has existed since OpenWrt 24.10.0, and which @ldir-EDB0 mentioned again. Hopefully, we will have another upstream daemon update by the official release of 25.12, then we will need two fewer patches here, and I would like to leave open the possibility of changing the default of a new option in the current PR, and get your opinion on it, or rename an option name. Is this a viable path to go?
Before squashing: At the beginning, it was written that the commit messages were insufficient, so I adjusted them. Now I've heard that they are extensive (too extensive?), or perhaps that referred more to the scope of the PR. What do you think they should be like? How many commits? Extensive text, or shorter (%, example)? Or parts of the description only in the PR? I am aware that the refactoring commits probably do not belong between the feature commits (beginning/end?). If you want multiple commits to merge the PR, I would redo them again.
OpenWrt now offers the option of selecting not only the very-verbose debug level for extra logging, but also the info level, which is usually sufficient. The logging is still unsatisfactory and confusing in the daemon. Insignificant things such as a non-existent (not yet) IPv6 lease file, which the daemon then deletes itself, is logged as error, but the essential port mapping requests, from the newly introduced info level onwards, are still not clear and mapping protocol agnostic. I have added your mentioned issues, and other related (5 in OpenWrt), as the last item on my core issues list. However, I have just checked the specific logging with this PR under OpenWrt. With the default log level, such flooding logging no longer occurs under normal circumstances. Even restarting the service only logs a few lines. In the event of errors or the previous debug logging, however, it is still extensive until this is improved in the daemon. miniupnpd: Core functionality issues |
So let's merge this firstly so someone will notice the LuCI is broken ;) |
As I am actively searching for solutions to issues for OpenWrt users and developers, I have just added an additional daemon patch to improve logging, as a small end-of-year gift. But when I think of the users who have been affected by critical bugs in the daemon since OpenWrt 24.10.0 in February and have been waiting for a solution, I would feel better if we could merge the fixes for them as soon as possible... So, once again, my request: Let us first merge the first commit here, so that users who are updating to OpenWrt 24.10.5 or 25.12.0.rc1 right now are satisfied. Can the first commit be cherry-picked (removing the |
Applided to 70ce349, thanks! |
Thank you very much for merging! That's a gift! |
|
What about merging into the 24.10 and 25.12 branches? |
no ETA, but probably a few days later if our buildbot on master branch is happy
I guess no. The upnp package on 23.05 branch is even older and I don't want to take the risk of updating it. |
|
I reported this to GitHub: https://redirect.github.com/openwrt/luci/pull/7822#issuecomment-3731725055 Update: New bloated comment: Is this an repeating/off-topic/abusing SPAM bot???? ;-( Can we do something about that? E.g. @GeorgeSapkin. Could you help? |
This comment was marked as spam.
This comment was marked as spam.
|
|
@Self-Hosting-Group I pinged some people for assistance, but I don't have access to anything, so can't do much. Sorry. |
|
Thanks. I can also justify my request with examples. However, I do not want to draw any more attention to this cold wind if this is not necessary. I see someone here who is offended. And who is also spreading falsehoods (e.g. there's no miniupnp team, only single maintainer with repo privileges, and no ToS missuse...). Note: We have 8 off-topic/abusive/zero-content comments from this user on this PR alone (+2 on LuCI, +2 new issues)
? |
This comment was marked as spam.
This comment was marked as spam.
|
@Neustradamus you are not contributing anything to this PR besides noise. In fact I don't see you contributing anything to OpenWrt in general. I would think your comments being marked as spam and hidden would be signal enough, but no. Please stop. |
This comment was marked as spam.
This comment was marked as spam.
|
I have enough with this, honestly. Let's back to the code, any more changes needed before we merging this? LuCI changes? @Self-Hosting-Group I hope you can still reply this thread ;) |
|
Can we pull the trigger on this, finally? |
|
so is this okay for merge? |
|
The patch needs to be rebased |
As this PR is extensive, the descriptions of the individual commits are collapsed here:
0. Update to 2.3.9 to fix issues, refresh building (merged 70ce349 2025-12-24, in 24.10/25.12 packages 2025-12-30)
upnp_forwardand return the correct internal port; also resulted in the excessive opening of new ports. Accept interface names starting with digitsminiupnp.free.frwas down for 20 days miniupnp/miniupnp#770 https://stats.uptimerobot.com/DwGDxUB914--disable-pppconnto remove the old/IGDv1-only extra WANPPPConnection SSDP announcements workaround not included in other implementations since >15y--vendorcfgto allow customisation of the router/friendly name (+5 potential options) displayed in Windows Explorer, 384 bytes extra required on ARMv7 (binary)clean_ruleset_interval/thresholdUCI config options as not standard/working since OpenWrt 22.03, as nftables not supportedFixes: openwrt/openwrt#18011
Fixes: openwrt/luci#7759
Fixes: #26352
1. Patch to backport daemon fixes
Link: https://github.com/Self-Hosting-Group/miniupnp/tree/backports-to-2.3.9
2. Patch for UPnP IGDv2 Microsoft/Apple compat
(to merge with prior)
Link: https://github.com/Self-Hosting-Group/miniupnp/tree/upnp-igdv2-compat
3. Patch to improve logging
(to merge with prior)
Link: https://github.com/Self-Hosting-Group/miniupnp/tree/improve-logging
4. Package revision and new UCI options
The following settings UCI options been added or changed, and the previous options are migrated on updating:
Notes:
lease_file6=${lease_file}-ipv6so that active IPv6 port maps are not lost when service restarts, e.g. by deleting an active port map. Remove option if UCI default setCode refactoring:
upnpd_write_bool/etc/config/upnpdUCI config fileDepends on: openwrt/luci#7822
Fixes: #17413
5. Group/rearrange config-gen, refactoring
xml_encode(to merge with prior)
6. Rename UCI section to settings v2.0
Rename UCI section
config(v1.0) ->settings(v2.0), helps on migration and to distinguish the updated config from the previous one(to merge with prior)
7. Update ACL options, migrate section
acl_entryis_port_or_rangefunction instead ofupnpd_get_port_rangeand check if it has a valid range, and removes a shellcheck warningconf_rule_addfunction toupnpd_add_acl_entry(to merge with prior)
8. Separate service start and config-gen
config_foreach upnpd "upnpd"and replace it with regular function call, as init was not designed for a multi-instance setup, as the sametmpconfwill be used/overwritten, and non-anonymous sectionupnpdtoupnpd_generate_configifcases withelifin init/hotplugprocd_add_reload_trigger "firewall"instead of listening/etc/config/firewall(to merge with prior)
9. Rearrange init, format `firewall3.include`
start_serviceand main init functions firstfirewall3.includeusing shfmt(to merge with prior)
(The italic commits are intended to be merged with the prior ones after review)
Screenshots
The new network-wide access control functionality… can best be described using the LuCI screenshots:
Enable Networks / Access Control (new)
Edit Network Access Control Settings (new)
Advanced Settings tab with new CGNAT functionality
UPnP IGD Adjustments tab (new)
LuCI notification if the related package is not updated (new)
Full LuCI screenshot
Depends on LuCI PR: openwrt/luci#7822
The first commit here has no dependencies and is intended for early cherry-picking
Tested on: OpenWrt 24.10.5 and 25.12.0
Wanted: Microsoft Xbox One/Series console users with OpenWrt to provide UPnP IGD logs as specified in #24988 (comment) (updated package not necessary).
**miniupnpd: Core functionality issues **
https://github.com/Self-Hosting-Group/miniupnpd-issues
The Port Control Protocol (PCP) is the successor to NAT-PMP, shares similar protocol concepts and packet formats, but supports IPv6 port mapping and options/extensions. For more information, see:
Port Mapping Protocols Overview and Comparison 2026+: About UPnP IGD & PCP/NAT-PMP
https://github.com/Self-Hosting-Group/wiki/wiki/Port-Mapping-Protocols-Overview