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 

Several suggestions for miniupnp

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



Joined: 13 Aug 2013
Posts: 2

PostPosted: Tue Aug 13, 2013 3:33 am    Post subject: Several suggestions for miniupnp Reply with quote

Dear Thomas:
I'm an engineer in a network & communication system company and my job especially focuses on upnp and something else. There are several helpful suggestions for miniupnp and I've delt with ever. Those are shown as below:

1. UCTT 2.0 is very critial for most of network & communication system companies because it is released by UPnP Forum to justify the UPnP on every device. It could be better if your group can verify every version of miniupnp before releasing them. Besides, Win 8 Logo and Xbox 2Nic test is another big issue but it needs licience for users. If your budget is fine, you could try to pass Win 8 Logo and Xbox 2Nic test.

2. According to the specification of UPnP Forum, if the existing nat rule conflicts the new one, it should update the nat rule. I suggests that you could update the lease file and redirect rule before response error message in upnp_redirect().
3. I discover that getifaddr() in getifaddr.c will return 0, connection status is connected, even if the status of WAN is disconnected or WAN interface is not found. Please check it out.

4. The linked list of subscriber list (used for saving subscribers) and rdr desc (used for saving service name of nat rule) should be written in one or respetive file, otherwise the information will lose if WAN is down unexpectedly.

5. GetTotalBytesSent() and GetTotalBytesReceived() in upnpsoap.c, the value of total bytes sent/received (the variable r) should use '&' rather than '%'. Because '%' operand could skip TOTAL_MAX.

6. To pass Win 8 Logo GetTotalBytesSent_Counter_Rollover and GetTotalBytesReceived_Counter_Rollover, getifstats.c in miniupnpd-1.7\linux should use strtoull(), otherwise the value will be overflow.

7. You could regularly check the nat rule is expired or not in main(). Remember to send upnp_event_var_change_notify, and dp some appropriate operation on lease file and rdr_desc_list.

Those are my humble suggestions. Your group can neglect them or implement feasible items.

Best Regards,
Fred Liao
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Aug 14, 2013 2:21 pm    Post subject: Reply with quote

1 - I don't think miniupnpd on its own should be certified. Compliance with standards and ability to pass tests is subject to : parameters used to compile, OS and packetfiltering used (pf/netfilter/ipfw/etc.), configuration, etc.
It is up to the designer of the router to have it tested/certified or not.
There are so much home router devices shiped with very stupid configuration that I dont want people to think a device is OK because it is using miniupnpd which is certified...

In addition, I don't have the resource to have a proper test set up and spend the time needed.
So I make anything possible to pass UCTT 2.0 tests, but is is up to the integrator/packager to tests its own package.

2 - I have to read again this. Can you point the UPnP document and page where this is specified ?

3 - I just tested and with the interface down, getifaddr() returns -1
Can you more specific on how you reproduce the problem ?
which OS, configuration, output of ifconfig

4 - saving subscribers in a file is indeed somthing that could be interesting.
however rdr desc is already saved in "lease file" (if enabled)

5 - I don't really understand what is you suggestion.
bytes counts are definded as 32bits unsigned in UPnP standard aren't they ? I don't see what is wrong with the current code.
Please be more specific and explain what I am missing...

6 - GetTotalBytesSent_Counter_Rollover and GetTotalBytesReceived_Counter_Rollover are not in miniupnpd.
also you mention miniupnpd-1.7 which is a pretty old version.
Please use the latest sources

7 - hum some work has already been done on this side.
I have no time to check what should be improved now, but you can submit a patch with your own improvements.

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



Joined: 13 Aug 2013
Posts: 2

PostPosted: Wed Aug 14, 2013 5:19 pm    Post subject: Reply with quote

2. I quote from UPnP-gw-WANIPConnection-v1-Service.pdf
In page 13, If the RemoteHost, ExternalPort, PortMappingProtocol and InternalClient are exactly the same as an existing mapping, the existing mapping values for InternalPort, PortMappingDescription, PortMappingEnabled and PortMappingLeaseDuration are overwritten.".

3. I mean that the part of "Works for all address families (both ip v4 and ip v6)". To the if-statement of skipping other interfaces, if no interface matches ifname and leave the for-loop, it will return 0? or I'm wrong.

5. Apologist, TOTAL_MAX is definition of my code. I remember that specification points out that the range is 0 ~ (2^32)-1. It supposes to take care this value within that range.

6. Using strtoull() in getifstats.c in miniupnpd-1.7\linux could be safe, the value read from /proc/net/dev, according to my observation to certain devices, could be greater than unsigned long.

7. I apologize that I cannot provide any code to you because I've signed a certification contract to protect all programs my company possesses.
Back to top
View user's profile Send private message
NickyVtal



Joined: 02 Jan 2016
Posts: 1
Location: Two Hours From ARCO

PostPosted: Fri Jan 08, 2016 8:13 pm    Post subject: Several suggestions for min Reply with quote

Thank you for this huge proposal list We will taken into account your suggestions. Unfortunatelly at this time I cant answer to you in detail about each of points.
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Feature Request 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.