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 

miniupnpdctl Output Problem
Goto page 1, 2  Next
 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
MikeMcr



Joined: 20 Dec 2009
Posts: 5

PostPosted: Sun Dec 20, 2009 1:46 pm    Post subject: miniupnpdctl Output Problem Reply with quote

miniupnpdctl appears to be outputting control characters when it lists each ruleset. Here is an example with just the rules:

Code:
0 œuÿ   UDP 2011->192.168.1.17:2011 'Xbox (192.168.1.17:2011) 2011 UDP' 0 0
1 œuÿ   TCP 3333->192.168.1.18:3333 'Testing' 0 0


I looked at the code in the function "write_ruleset_details" of "upnpredirect.c" and can see those characters are supposed to be the interface name.

If I follow that function, it doesn't appear to fill out the interface name as far as I can see (using iptables).

Is this a bug - shouldn't it just output null if it doesn't know the interface name?

As a feature request, it would be nice if there was a specific header label (e.g. Rules:) to help with parsing out just the ruleset block.
Back to top
View user's profile Send private message
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 9:47 am    Post subject: Reply with quote

To further verify what's going on, the miniupnpdctl he is referring to is compiled for mips32 to be run on DD-WRT. Miniupnpd has been compiled and runs/functions successfully against iptables 1.4.1 using the openwrt toolchain. The output from miniupnpdctl when compiled for linux x86 works as expected. So this seems to be mips gcc related, but if you could help us out that would be great as I'm trying to get miniupnpd integrated into DD-WRT in the future.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Dec 22, 2009 2:32 pm    Post subject: Reply with quote

I'll have a look at it.
_________________
Main miniUPnP author.
https://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: 1589

PostPosted: Tue Dec 22, 2009 5:32 pm    Post subject: Reply with quote

Is that Ok ?
miniupnpd-1.4.20091222.tar.gz
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 6:11 pm    Post subject: Reply with quote

The output still remains the same, I'm attaching the binaries, my makefile, my config.h, and a log of miniupnpdctl output.

Which can be found here http://www.box.net/shared/gak7tsk892

I want to thank you for taking time to help with this, I wish all developers were so kind.
Back to top
View user's profile Send private message
edrikk



Joined: 22 Dec 2009
Posts: 2

PostPosted: Tue Dec 22, 2009 6:35 pm    Post subject: Reply with quote

This is also exactly why I would love to see miniupnpd integrated into DD-WRT.

I've followed these forums out of interest on-and-off, and both the dev. and the product are top-notch. Both in terms of the fact that "it just works" and give-and-take with the community.

miniupnpd is one of the reasons why Tomato firmware is so stable and great.


Last edited by edrikk on Tue Dec 22, 2009 8:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 6:42 pm    Post subject: Reply with quote

Hey edrikk, as you can tell miniupnp were all DD-WRT users here in this thread Smile
Back to top
View user's profile Send private message
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 8:46 pm    Post subject: Reply with quote

Ok with the changed source compiled against iptables 1.3.7 with #define ENABLE_NATPMP commented out I don't get the trash from miniupnpdctl, but now it won't compile with #define ENABLE_NATPMP not commented out. I'm lost really, been working at this all day.
Back to top
View user's profile Send private message
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 9:07 pm    Post subject: Reply with quote

It is #define MULTIPLE_EXTERNAL_IP that was causing the breakage with your updated source, commented that out and everything is good. Thanks Thomas, I will use it as it is for now and wait for new sources to address the multiple IP issue.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Dec 22, 2009 10:27 pm    Post subject: Reply with quote

autobot wrote:
The output still remains the same, I'm attaching the binaries, my makefile, my config.h, and a log of miniupnpdctl output.

Which can be found here http://www.box.net/shared/gak7tsk892

I want to thank you for taking time to help with this, I wish all developers were so kind.

That is strange because I added "headers" in the output of miniupnpdctl.
For example, it is what i get on my openbsd machine :
Code:
Connected.
Options :
opt=01 xl1
opt=03 192.168.0.1/24
opt=03 192.168.1.1/24
opt=04 0
opt=16 yes
opt=21 yes
opt=05 1000000
opt=06 10000000
opt=19 no
opt=09 yes
opt=08 60
opt=15 600
opt=11 fc4ec57e-b051-11db-88f8-0060085db3f6
opt=12 12345678
opt=13 1
Permissions :
00 allow 1024-65535 c0a80000/ffffff00 1024-65535
01 allow 1024-65535 c0a80100/ffffff00 1024-65535
02 allow 1024-65535 c0a80000/fffffe00 22-22
03 allow 12345-12345 c0a80771/ffffffff 54321-54321
04 deny 0-65535 00000000/00000000 0-65535
HTTP :
CTL :
struct ctlelem: socket=11
Ruleset :
 0 xl1 UDP 40384->192.168.0.141:40384 'Azureus UPnP 40384 UDP' 425669 111390450
 1 xl1 TCP 40384->192.168.0.141:40384 'Azureus UPnP 40384 TCP' 13995985 10115788238
Events details :
Subscribers :

you should have at least the lines Options :, HTTP:, etc... in your output !
_________________
Main miniUPnP author.
https://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: 1589

PostPosted: Tue Dec 22, 2009 10:37 pm    Post subject: Reply with quote

autobot wrote:
It is #define MULTIPLE_EXTERNAL_IP that was causing the breakage with your updated source, commented that out and everything is good. Thanks Thomas, I will use it as it is for now and wait for new sources to address the multiple IP issue.

I dont think you want multiple IP address support... The concept just dont work well with UPNP IGD Wink
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Tue Dec 22, 2009 11:16 pm    Post subject: Reply with quote

Ok I will take your word on it, I do have those lines but they are blank.
Back to top
View user's profile Send private message
MikeMcr



Joined: 20 Dec 2009
Posts: 5

PostPosted: Wed Dec 23, 2009 5:12 pm    Post subject: Reply with quote

miniupnp, thanks for the new build. As autobot reported, it fixed the output of control characters and I just get null now in that position which is fine. Also, thanks for adding the section headings; it is more cleaner now.

Autobot, thanks for the updated DD-WRT binaries. The reason you do not get the same output as the example posted by miniupnp is because you are not using a miniupnpd.conf file, I think?

I am and get the full output. I wanted to take advatange of all the options you can set in the conf, such as security mode and block access to a set range of addresses. This is a great feature and another advantage over the DD-WRT provided UPnP.

One thing I did notice though; miniupnpdctl seems to ignore options passed via the command line. For example, I use:

Code:
miniupnpd -i vlan2 -a 192.168.1.1 -f miniupnpd.conf


(I've removed the full paths but you get the idea)

miniupnp, is that allowed? Can you use command line options as well as the .conf file? miniupnpdctl does not report the parameters passed on the command line (only) so I am wondering if they are being ignored completely?
Back to top
View user's profile Send private message
autobot



Joined: 06 Dec 2009
Posts: 8

PostPosted: Wed Dec 23, 2009 5:42 pm    Post subject: Reply with quote

Correct I don't use a file, I'm not going to rewrite the install script to generate a configuration file as it just isn't necessary for most users.

@ miniupnp
How would your prefer I integrate your license? Would it be enough to output this at the end of my install script.

Code:

Copyright (c) 2006-2009, Thomas BERNARD
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * The name of the author may not be used to endorse or promote products
  derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Dec 29, 2009 2:13 pm    Post subject: Reply with quote

1) About the license : As long as the license text is included in all binary or source distribution, this is ok. Having it at the end of the install script should be enough

2) about the command line arguments : Even if a config file is used they shouldn't be ignored... maybe there is a bug.
Also I should improve command line argument parsing if you prefer to avoid having a config file. In that case, tell me what options you need.
_________________
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
Goto page 1, 2  Next
Page 1 of 2

 
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.