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

Standardisation of port map description length to 1016 #746

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Self-Hosting-Group
Copy link
Contributor

Currently used length limits for port map description:

  • 1024: in daemon netfilter_nft/
  • 256: in daemon netfilter_nft/ netfilter/
  • 80: in client miniupnpcmodule.c upnpc.c
  • 64: in daemon miniupnpd.c upnpredirect.c pf/ ipfw/ ...

Therefore the current daemon limit is 64 and the client limit is 80.

The maximum length is not defined in the UPnP IGD standards. The built-in Windows client allows any description length (>20k tested).

The provided PR changes the limit to 1016 bytes according to the PCP description option standard.

@miniupnp miniupnp self-assigned this May 29, 2024
@miniupnp
Copy link
Owner

miniupnp commented Jun 4, 2024

miniupnpd was first developped for pf and use the pf rule "label" which is limited to 64 bytes to store the description.

Copy link
Owner

@miniupnp miniupnp left a comment

Choose a reason for hiding this comment

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

This PR completely misses the fact that 64 characters is the hard limit in miniupnpd at least with pf backend.

miniupnpd/natpmp.c Outdated Show resolved Hide resolved
miniupnpd/ipfw/testipfwrdr.c Outdated Show resolved Hide resolved
miniupnpd/natpmp.c Outdated Show resolved Hide resolved
miniupnpd/netfilter/testiptcrdr.c Outdated Show resolved Hide resolved
miniupnpd/netfilter/testiptcrdr_dscp.c Outdated Show resolved Hide resolved
miniupnpd/netfilter/testiptcrdr_peer.c Outdated Show resolved Hide resolved
miniupnpd/netfilter_nft/testnftnlrdr.c Outdated Show resolved Hide resolved
miniupnpd/netfilter_nft/testnftpinhole.c Outdated Show resolved Hide resolved
miniupnpd/pf/testobsdrdr.c Outdated Show resolved Hide resolved
miniupnpd/pf/testpfpinhole.c Outdated Show resolved Hide resolved
@Self-Hosting-Group
Copy link
Contributor Author

Thanks for the PR review.

@miniupnp
Copy link
Owner

In fact the limit should be removed from miniupnpc (API needs to be changed)
but miniupnpd is limited to 64 chars

@Self-Hosting-Group Self-Hosting-Group marked this pull request as draft November 15, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants