Skip to content

net/upnp: Complete service improvements 2/2#5256

Draft
Self-Hosting-Group wants to merge 3 commits intoopnsense:masterfrom
Self-Hosting-Group:not-applied
Draft

net/upnp: Complete service improvements 2/2#5256
Self-Hosting-Group wants to merge 3 commits intoopnsense:masterfrom
Self-Hosting-Group:not-applied

Conversation

@Self-Hosting-Group
Copy link
Contributor

No description provided.

Comment on lines 48 to 50
//$fw->registerAnchor('miniupnpd', 'fw');
//$fw->registerAnchor('miniupnpd', 'nat', 0, 'head');
//$fw->registerAnchor('miniupnpd', 'binat');
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure breaking with historically established code is a wise thing to do.

both rdr and "fw" are historically anchored in the code opnsense/core@edc40978997e

nat and binat were added in #3165

}

if (!empty($upnp_config['allow_third_party_mapping'])) {
if (($upnp_config['allow_third_party_mapping'] ?? '') == '1' || ($upnp_config['allow_third_party_mapping'] ?? '') == 'upnp-igd') {
Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

@Self-Hosting-Group Self-Hosting-Group force-pushed the not-applied branch 4 times, most recently from 7216aa4 to b0852db Compare February 27, 2026 15:49
@Self-Hosting-Group Self-Hosting-Group changed the title net/upnp: Not applied in #5126 net/upnp: Complete service improvements 2/2 Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants