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 

UUID

 
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: Fri Jun 07, 2013 4:57 pm    Post subject: UUID Reply with quote

until I hear back from upnp.org about some of the other issues, the UUID being unique for each device is the only thing left to fix for certification.

would an easy fix be to just increment the last digit of the UUID for each device, thus making them unique... might be the easiest solution for now. I'm going to take a look at the code and see if I can't help you out
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sat Jun 08, 2013 8:23 am    Post subject: Reply with quote

I don't thing there is such thing as an "easy thing" to fix that.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Tue Jun 11, 2013 10:22 pm    Post subject: Reply with quote

Not an easy fix, just easier. This should be the last bit to pass certification though.

I'm tracing through everything to give myself a better idea, and hopefully help you out. For the alive message broadcast, sent via the "SendSSDPAnnounce2" function which is called multiple times (for each service/device), from ProcessSSDPData. So you could change the SendSSDPAnnounce2 function to accept the UUID and have an array of UUID read in from the conf file which would simply be incremented in the ProcessSSDPData function.

For the byebye functionality, you pretty much already have this, all you have to do is increment the UUID value within the for loop in SendSSDPbyebye.

I can code it up if you want, so you can take a look and tell me
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Jun 12, 2013 8:37 am    Post subject: Reply with quote

SSDP is not the only place where UUID is processed. The UUIDs have to match the XML descriptions
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Wed Jun 12, 2013 6:33 pm    Post subject: Reply with quote

where are the xml descriptions?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Jun 13, 2013 4:09 pm    Post subject: Reply with quote

see that patch :
https://github.com/miniupnp/miniupnp/commit/50ec2fce4a8faf94104c49f93eb6426806db0ed6
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
twear



Joined: 01 Nov 2012
Posts: 80

PostPosted: Fri Jun 14, 2013 4:37 pm    Post subject: Reply with quote

I tested it and the only issue, after talking to the upnp.org group is that the message:
Quote:
NT: uuid: 1935ead7-1886-4384-a7db-e7a0193091e6\r\n
USN: uuid: 1935ead7-1886-4384-a7db-e7a0193091e6\r\n


needs to be sent for every UUID. Which I'm guesing just means removing the if(i==0) /* root device */ line in SendSSDPNotifies.

can you confirm?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri Jun 14, 2013 4:57 pm    Post subject: Reply with quote

I think you are right. see the following patch
Code:
--- minissdp.c  13 Jun 2013 13:21:29 -0000      1.52
+++ minissdp.c  14 Jun 2013 16:56:11 -0000
@@ -537,11 +537,14 @@ SendSSDPNotifies(int s, const char * hos
                               known_service_types[i].uuid, "::",
                               known_service_types[i].s, /* ver_str,    USN: */
                               lifetime, ipv6);
-               if(i==0) /* rootdevice */
+               if(0==memcmp(known_service_types[i].s,
+                            "urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
+               {
                        SendSSDPNotify(s, (struct sockaddr *)&sockname, host, port,
-                                      uuidvalue_igd, "",       /* NT: */
-                                      uuidvalue_igd, "", "", /* ver_str,      USN: */
+                                      known_service_types[i].uuid, "", /* NT: */
+                                      known_service_types[i].uuid, "", "", /* ver_str, USN: */
                                       lifetime, ipv6);
+               }
                i++;
        }
 }

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



Joined: 01 Nov 2012
Posts: 80

PostPosted: Fri Jun 14, 2013 6:13 pm    Post subject: Reply with quote

should of caught this before, but ut needs to go in the byebye messages as well
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sat Jun 15, 2013 12:49 pm    Post subject: Reply with quote

Code:
--- minissdp.c  14 Jun 2013 16:58:00 -0000      1.53
+++ minissdp.c  15 Jun 2013 12:49:06 -0000
@@ -922,7 +922,8 @@ SendSSDPGoodbye(int * sockets, int n_soc
                                              known_service_types[i].uuid, "::",
                                              known_service_types[i].s, /* ver_str, USN: */
                                              ipv6);
-                       if(i==0)        /* root device */
+                       if(0==memcmp(known_service_types[i].s,
+                                    "urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
                        {
                                ret += SendSSDPbyebye(sockets[j],
 #ifdef ENABLE_IPV6
@@ -930,8 +931,8 @@ SendSSDPGoodbye(int * sockets, int n_soc
 #else
                                                      (struct sockaddr *)&sockname,
 #endif
-                                                     uuidvalue_igd, "",        /* NT: */
-                                                     uuidvalue_igd, "", "", /* ver_str, USN: */
+                                                     known_service_types[i].uuid, "",  /* NT: */
+                                                     known_service_types[i].uuid, "", "", /* ver_str, USN: */
                                                      ipv6);
                        }
        }

_________________
Main miniUPnP author.
https://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.