net/upnp: Complete service improvements 2/2#5256
Conversation
| } | ||
|
|
||
| if (!empty($upnp_config['allow_third_party_mapping'])) { | ||
| if (($upnp_config['allow_third_party_mapping'] ?? '') == '1' || ($upnp_config['allow_third_party_mapping'] ?? '') == 'upnp-igd') { |
There was a problem hiding this comment.
feels like this overcomplicates things and imposes "upnp-igd" on the meaning when in reality we're flipping pcp with this and the secure mode simply is handled as a separate toggle?
There was a problem hiding this comment.
It may look overcomplicated to you, but that's only because the daemon initially had the meaningless option name secure_mode for UPnP IGD, PCP support was added later. secure_mode only applies to UPnP IGD, whereas pcp_allow_thirdparty (reversed) only applies to PCP. The same option is also available in OpenWrt, and I cannot imagine why anyone would make two options out of it.
There was a problem hiding this comment.
Fair, still don't like the handling of this with four times ?? '' and two times checking the same flag. something that an in_array() can do much more concisely.
7216aa4 to
b0852db
Compare
- More specific allow third-party mapping UI option - Remove unnecessary `binat` anchor registration - Fix debug logging not treating `-v -v` (follow-up to 7658677) - Update missed changelog Follow-up to opnsense#5126
| default: | ||
| break; | ||
| case 'debug': | ||
| $cmd_frmt[] = '-vv'; |
There was a problem hiding this comment.
need evidence -v -v works differently than -vv
There was a problem hiding this comment.
The commit message explains why that is needed for the special behaving daemon: Fix debug logging not treating -v -v (follow-up to 7658677)
There was a problem hiding this comment.
The miniupnpd code suggests it doesn't care if it's -vv or -v -v which is why I raised the question after you said it's wrong. I just want a dependable answer.
There was a problem hiding this comment.
There was a problem hiding this comment.
both -v -v and -vv trigger verbosity_level++; twice if I read this correctly. I just want to know what mistake I made so I can avoid it in the future.
There was a problem hiding this comment.
I made a mistake. When I first tested it, it didn't seem to work, but I just tested it again and now it works. Sorry!
- More specific allow third-party mapping UI option - Remove unnecessary `binat` anchor registration - Fix debug logging not treating `-v -v` (follow-up to 7658677) - Update missed changelog Follow-up to opnsense#5126
b0852db to
fe81fd2
Compare
|
I don't know if you want a changelog or to what extent. The list of new/removed UI options can be dropped, or the changelog reduced to just one line, as you prefer. |
Changelog seems good, thanks! |
fe81fd2 to
bcca2b7
Compare
|
@fichtner Both PRs ready. |
|
Merged, thanks! |
|
Thank you. I am happy that you have removed the length limit of the new entries in the changelog; it looks more compact. |
|
It's not |
we don't assert credits for helping with contributions since it's day to day work anyway |
|
FWIW, I'm pushing the plugin changes into today's 26.1.3. Need to look and discuss the ports PR at a later point in time. |
|
FWIW: In order to keep the maintenance effort for the added tested patches to a minimum in the future, I have suggested them to the daemon project and just updated the FreeBSD ports PR. PS: There is already a note about this in the changelog. |
|
If you want my professional opinion work directly upstream and forget FreeBSD. Your PR nears the 1 year mark. Nobody is willing to invest time to help out contributors. One of the reasons why we do things differently in OPNsense. |
|
Exactly, that was my plan! ;-) I never wanted to add the same patches multiple times downstream (for multiple router OSs). However, little is happening upstream. Therefore, I attempted to resolve the daemon logging issues for OPNsense customers (I'm not a user), in this manner, as I feel like I have no other choice. See daemon activity: https://github.com/miniupnp |
|
Well, we can add some legitimacy for your patches from here, but ultimately a small fork to point to for patches would be preferable to keep the repo noise down in the ports tree. I did something similar with ports-mgmt/pkg, see opnsense/ports@bbd09e7 so we have https://github.com/opnsense/pkg to hold modifications (which are also easier visible and reviewable) |
|
Good idea! I'll come back to it soon. |
binatanchor registrationFollow-up to #5126