From 8381867faf82f3d779f797e59582b3c76a827ecd Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 23 Jun 2023 01:08:06 +0200 Subject: [PATCH] Detect FDSSDP as a microsoft client fixes 2f2685af97c28ee3559af8d0a0cdf5d8b215a68f so FDSSDP.dll (Function Discovery Simple Service Discovery Protocol) client is properly detected. --- miniupnpd/Changelog.txt | 5 ++++- miniupnpd/upnphttp.c | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 9fe8872..fc3bdd6 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,7 @@ -$Id: Changelog.txt,v 1.501 2023/05/27 16:49:14 nanard Exp $ +$Id: Changelog.txt,v 1.502 2023/06/22 23:17:03 nanard Exp $ + +2023/06/23: + detect FDSSDP as a Microsoft client 2023/05/27: option enable_natpmp => enable_pcp_pmp diff --git a/miniupnpd/upnphttp.c b/miniupnpd/upnphttp.c index b6241fb..026731d 100644 --- a/miniupnpd/upnphttp.c +++ b/miniupnpd/upnphttp.c @@ -1,9 +1,9 @@ -/* $Id: upnphttp.c,v 1.111 2021/05/22 21:34:12 nanard Exp $ */ +/* $Id: upnphttp.c,v 1.113 2023/06/22 23:17:01 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * Project : miniupnp * Website : http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ * Author : Thomas Bernard - * Copyright (c) 2005-2021 Thomas Bernard + * Copyright (c) 2005-2023 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file included in this distribution. * */ @@ -310,8 +310,11 @@ ParseHttpHeaders(struct upnphttp * h) } else if(strncasecmp(line, "user-agent:", 11) == 0) { - if(strcasestr(line + 11, "microsoft") != NULL) + /* - User-Agent: Microsoft-Windows/10.0 UPnP/1.0 + * - User-Agent: FDSSDP */ + if(strcasestr(line + 11, "microsoft") != NULL || strstr(line + 11, "FDSSDP") != NULL) { h->respflags |= FLAG_MS_CLIENT; + } } #ifdef ENABLE_EVENTS else if(strncasecmp(line, "Callback:", 9)==0)