miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UPnP Certification failure

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Tue Feb 26, 2013 6:00 pm    Post subject: UPnP Certification failure Reply with quote

I loaded MiniUPnPd on my arm device, and am trying to get it to pass the certification tests. There are certian tests I do not expect it to pass, such as set default connection, force termination, and setConnectionType.

I did expect it however to pass Add Port Mapping. However it fails with the error "Missing PortMappingNumberOfEntries variable in the notification event.
". I'm not sure if this is a bug or if a new feature request is needed. It would be nice if it could pass the test though
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Tue Feb 26, 2013 9:33 pm    Post subject: Reply with quote

I dont remember the exact status of this PortMappingNumberOfEntries variable. Maybe I have to add code to manage events about it.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Tue Feb 26, 2013 9:43 pm    Post subject: Reply with quote

I just had a look at the code and PortMappingNumberOfEntries is outputed in variables for service WANIPConnection.

Have you the exact log of why the certification test is failing ?
Maybe it is because the event message is not sent when expected...
Code:
<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0" xmlns:s="urn:schemas-upn
 <e:property>
  <s:PossibleConnectionTypes>IP_Routed</s:PossibleConnectionTypes>
 </e:property>
 <e:property>
  <s:ConnectionStatus>Connected</s:ConnectionStatus>
 </e:property>
 <e:property>
  <s:ExternalIPAddress>1.2.3.4</s:ExternalIPAddress>
 </e:property>
 <e:property>
  <s:PortMappingNumberOfEntries>42</s:PortMappingNumberOfEntries>
 </e:property>
</e:propertyset>

_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Wed Nov 30, 2016 5:39 pm    Post subject: Reply with quote

Hello,

I see a UCTT failure for the "AddPinhole Twice" case.

The following comment says that
/* In cases where the RemoteHost, RemotePort, InternalPort,
* InternalClient and Protocol are the same than an existing pinhole,
* but LeaseTime is different, the device MUST extend the existing
* pinhole's lease time and return the UniqueID of the existing pinhole. */

but upnp_add_inboundpinhole() always creates a new pinhole with newId though the lease time parameter is only different.

With the following modification in upnp_add_inboundpinhole(), it updates the leasetime of the existing pinhole and returns a UniqueId for twice the request.

#if 1 // UCTT 2.0 test case - AddPinhole Twice
*uid = upnp_find_inboundpinhole(raddr, rport, iaddr, iport, proto, NULL, 0 , NULL);
if(*uid >= 0) {
/* pinhole already exists, update new leasetime of the uid */
if (!upnp_update_inboundpinhole(*uid, timestamp)) {
return 1;
}
}
else
#endif

Is this OK to conform the test case?

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Wed Nov 30, 2016 10:38 pm    Post subject: Reply with quote

have you tested your modification ?
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Thu Dec 01, 2016 9:40 am    Post subject: Reply with quote

Yes, I have tested the modification with upnpc and UCTT 2.0.72 CP and it gets passed.

Here is the diff...

< #if 0
< if(r == 1 && strcmp(iaddr, iaddr_old)==0 && iport==iport_old)
< {
< syslog(LOG_INFO, "Pinhole for inbound traffic from [%s]:%hu to [%s]:%hu with protocol %s already done. Updating it.", raddr, rport, iaddr_old, iport_old, protocol);
< t = upnp_update_inboundpinhole(idfound, leaseTime);
< *uid = atoi(idfound);
< return t;
---
> #if 1 // UCTT 2.0 test case - AddPinhole Twice
> *uid = upnp_find_inboundpinhole(raddr, rport, iaddr, iport, proto, NULL, 0 , NULL);
> if(*uid >= 0) {
> /* pinhole already exists, update new leasetime of the uid */
> if (!upnp_update_inboundpinhole(*uid, timestamp)) {
> return 1;
> }

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Thu Dec 01, 2016 11:01 am    Post subject: Reply with quote

Thanks
https://github.com/miniupnp/miniupnp/commit/1a6c57847a30ebcc947eafffd81bce2136217a9c
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Fri Dec 02, 2016 5:04 pm    Post subject: Reply with quote

Hi,

One of the certification test cases "UDA-2.1.4 Conformance with Working Committee Templates" got failed on my router running miniupnpd 1.9 of version "IGD_v1" when testing with UCTT 2.0.27.

UCTT reports the following error, although the other test cases like Addressing, Discovery, and Description went fine.

17:39:20 INFO Checking if device is still alive
17:39:20 DEBUG GET for device description sent (http://192.168.1.1:34767/rootDesc.xml)
17:39:23 DEBUG Action "REFRESH_DEVICE" result: EXECUTED
17:39:23 DEBUG Test case initialization result: EXECUTED
17:39:23 DEBUG Executing "1" test step
17:39:23 DEBUG Executing "DESCRIPTION.GET_DESCRIPTIONS" action
17:39:23 INFO Fetching DUT description
17:39:23 INFO Downloading device description (http://192.168.1.1:34767/rootDesc.xml)
17:39:23 INFO Downloading service description (http://192.168.1.1:34767/L3F.xml)
17:39:23 INFO Downloading service description (http://192.168.1.1:34767/WANCfg.xml)
17:39:23 INFO Downloading service description (http://192.168.1.1:34767/WANIPCn.xml)
17:39:23 DEBUG Action "DESCRIPTION.GET_DESCRIPTIONS" result: EXECUTED
17:39:23 DEBUG Executing "DESCRIPTION.CHECK_AGAINST_WC_TEMPLATE" action
17:39:23 ERROR It's not standard device: "InternetGatewayDevice1"
17:39:23 ERROR "urn:schemas-upnp-org:device:InternetGatewayDevice:1" device uses domain reserved for devices defined by UPnP Forum Working Committees

17:39:23 INFO Checking "urn:schemas-upnp-org:service:Layer3Forwarding:1" service
17:39:23 ERROR It's not standard device: "InternetGatewayDevice1"
17:39:23 ERROR "urn:schemas-upnp-org:device:InternetGatewayDevice:1" device uses domain reserved for devices defined by UPnP Forum Working Committees
17:39:23 INFO Checking "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" service
17:39:23 ERROR It's not standard device: "WANDevice1"
17:39:23 ERROR "urn:schemas-upnp-org:device:WANDevice:1" device uses domain reserved for devices defined by UPnP Forum Working Committees
17:39:23 INFO Checking "urn:schemas-upnp-org:service:WANIPConnection:1" service
17:39:23 ERROR It's not standard device: "WANConnectionDevice1"
17:39:23 ERROR "urn:schemas-upnp-org:device:WANConnectionDevice:1" device uses domain reserved for devices defined by UPnP Forum Working Committees
17:39:23 DEBUG Action "DESCRIPTION.CHECK_AGAINST_WC_TEMPLATE" result: FAILED
17:39:23 DEBUG Step "1" result: FAILED
17:39:23 ERROR Test case result: FAILED

Is this due to mismatch in miniupnpd for the device IGD_V1 ?

Has anybody overcome this issue ?

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Fri Dec 02, 2016 7:34 pm    Post subject: Reply with quote

That error is strange. Have you asked the people which made the test about this ?
17:39:23 ERROR "urn:schemas-upnp-org:device:InternetGatewayDevice:1" device uses domain reserved for devices defined by UPnP Forum Working Committees

yes indeed the device does use a domain reserved by the UPnP Forum, because it has to do so !!!

also, why don't you test with miniupnpd 2.0 (latest version)
It is alsways important to test latest version
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Mon Dec 05, 2016 9:44 am    Post subject: Reply with quote

Indeed, the error is reported when tested with miniupnpd-1.9.20160222 nearly the latest version to miniupnpd 2.0.

Last edited by $aravanan01 on Mon Dec 05, 2016 12:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Mon Dec 05, 2016 12:46 pm    Post subject: Reply with quote

I have performed the same test with old version UCTT-2.0.36.6554 and the test case result is PASSED.

13:29:24 INFO Test case "UDA-2.1.4 Conformance with Working Committee Templates" started
13:29:24 INFO Timestamp: 2016-12-05 13:29:24. Tool version: 2.0.36.6554
13:29:24 INFO Checking if device is still alive
13:29:27 INFO Fetching DUT description
13:29:27 INFO Downloading device description (http://192.168.1.254:36138/rootDesc.xml)
13:29:27 INFO Downloading service description (http://192.168.1.254:36138/L3F.xml)
13:29:27 INFO Downloading service description (http://192.168.1.254:36138/WANCfg.xml)
13:29:27 INFO Downloading service description (http://192.168.1.254:36138/WANIPCn.xml)
13:29:29 INFO Checking "urn:schemas-upnp-org:service:Layer3Forwarding:1" service
13:29:29 INFO Checking "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" service
13:29:29 INFO Checking "urn:schemas-upnp-org:service:WANIPConnection:1" service
13:29:29 PASS Test case result: PASSED
13:29:29 INFO Execution of test case "UDA-2.1.4" completed. Timestamp: 2016-12-05 13:29:29

Whereas the same test FAILED with version UCTT-2.0.72.

It seems there is something broken in the version compatibility.
Back to top
View user's profile Send private message
$aravanan01



Joined: 28 Nov 2016
Posts: 8

PostPosted: Fri Dec 23, 2016 10:49 am    Post subject: Reply with quote

Hello,

There is an another UCTT test case failure for UDA-1.2.10 Man header empty or invalid checks.

The following changes fix this case and got Passed.

@@ -814,6 +814,8 @@
char sender_str[64];
char ver_str[4];
const char * announced_host = NULL;
+ char *man = NULL;
+ int man_len = 0;
#ifdef UPNP_STRICT
#ifdef ENABLE_IPV6
char announced_host_buf[64];
@@ -890,6 +892,20 @@
syslog(LOG_DEBUG, "MX: %.*s (value=%d)", mx_len, mx, mx_value);
}
#endif
+ /* Fix UDA-1.2.10 Man header empty or invalid */
+ else if((i < n - 3) && (strncasecmp(bufr+i, "MAN:", 4) == 0))
+ {
+ man = bufr+i+4;
+ man_len = 0;
+ while (*man == ' ' || *man == '\t')
+ man++;
+ while (man[man_len]!='\r' && man[man_len]!='\n')
+ man_len++;
+ }
+ }
+ if (!man || (strncmp(man, "\"ssdp:discover\"", 15) != 0)) {
+ syslog(LOG_INFO, "ignoring SSDP packet MAN empty or invalid header");
+ return;
}
#ifdef UPNP_STRICT
/* For multicast M-SEARCH requests, if the search request does

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1386

PostPosted: Fri Dec 23, 2016 11:13 am    Post subject: Reply with quote

thank you !
https://github.com/miniupnp/miniupnp/commit/3571a41d1ba36107f968de9fe71b68ae86b95029
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.