Created attachment 1938260 [details] miniupnpd spec patch Description of problem: .spec file contains incorrect sed replacement which lead to printf argument shift in the SSDP reply, which breaks UPnP discovery and makes IGD miniupnpd daemon unusable. Version-Release number of selected component (if applicable): 2.3.1-1, 2.3.0. How reproducible: 100% Steps to Reproduce: 1. Configure miniupnpd 2. Run tcpdump -n -i any port ssdp -A 3. Run upnpc -l Actual results: miniupnpd returns nonsense values in SSDP reply, namely LOCATION contains `uname -r` instead of IP address. HTTP/1.1 200 OK CACHE-CONTROL: max-age=120 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1 USN: uuid:00000000-0000-0000-0000-000000000000::urn:schemas-upnp-org:device:InternetGatewayDevice:1 EXT: SERVER: 22 UPnP/1.1 MiniUPnPd/2.3.1 LOCATION: http://2.6.32-042stab142.1:16405556/rootDesc.xml OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01 01-NLS: 38920 BOOTID.UPNP.ORG: 1673758597 CONFIGID.UPNP.ORG: 1673758597 Expected results: miniupnpd SSDP reply returns proper values. Additional info: .spec file contains sed replacement for config.h values, replacing, among others, OS_VERSION to %{fedora}. However, OS_VERSION need to contain %s for miniupnpd's printf to work correctly. Here's the snippet from the original config.h: #define DYNAMIC_OS_VERSION 1 #define OS_NAME "Linux" #define OS_VERSION "Linux/%s" #define OS_URL "http://www.kernel.org/" And this is what in .spec file: sed -i 's/OS_NAME.*$/OS_NAME "Fedora"/' config.h sed -i 's/OS_VERSION.*$/OS_VERSION "%{fedora}"/' config.h sed -i 's/OS_URL.*$/OS_URL "https:\/\/getfedora.org"/' config.h Not only OS_VERSION needs "%s" in the end, but this sed also replaces boolean DYNAMIC_OS_VERSION to the string value. Patch for spec file is in attachment.
Still the issue as of miniupnpd-2.3.1-3.fc39.
FEDORA-2023-61720b3e31 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-61720b3e31
FEDORA-2023-61720b3e31 has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-501a729cf2 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-501a729cf2
FEDORA-2023-829ba95ee2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-829ba95ee2
FEDORA-2023-829ba95ee2 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-829ba95ee2` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-829ba95ee2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-501a729cf2 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-501a729cf2` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-501a729cf2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-829ba95ee2 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-501a729cf2 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.