The solution in the last post is to use "miniupnpdctl".
Looking at the source, this appears to be a binary built along with miniupnpd. Autobot, I don't suppose you have a copy from your compiled build, please?
It wasn't that simple, I had to recompile miniupnpd with #define USE_MINIUPNPDCTL but its done and you can get what you want here. Since you seem to know what your doing could you redownload the new miniupnpd and miniupnpdctl and make sure that everything still functions properly and report back your findings please. _________________ Eko Builds
It wasn't that simple, I had to recompile miniupnpd with #define USE_MINIUPNPDCTL but its done and you can get what you want here. Since you seem to know what your doing could you redownload the new miniupnpd and miniupnpdctl and make sure that everything still functions properly and report back your findings please.
Thanks for doing that. I downloaded the new files and everything seems OK so far. However, the output of miniupnpdctl isn't very friendly so I'm not sure how I'm going to parse it yet.
I will look at the code later and see why its doing that, I'm going to sleep. You may need to use sed, cut or your preferred method to pretty that up till its fixed, if its a simple fix that is. _________________ Eko Builds
I will look at the code later and see why its doing that, I'm going to sleep. You may need to use sed, cut or your preferred method to pretty that up till its fixed, if its a simple fix that is.
The code seems to be in the function "write_ruleset_details" of "upnpredirect.c". Those control characters are supposed to be the interface name but it doesn't appear to get filled out for iptables.
I'll report that to the author as it seems to be dumping an uninitialised string.
Thanks, I will update it if a patch or new source is released. I'm not sure if this is a MIPS issue so I'm going to compile it for x86 and see if I get the same trash. I wish I would have learned c but I chose pascal/delphi back in the win98 era....it helps but very little. I will check the forum over at the miniupnp site and watch for your thread, unless you mailed him.
To those who read this, it has nothing to do with the proper function of miniupnp it is a minor issue with the output of miniupnpdctl which isn't installed by my script. _________________ Eko Builds
Thanks, I'm actually a Delphi programmer as well so in the same situation. Linux is new to me so when I said the output was horrible to parse, I meant it!
Anyway, I have attached what I have done so far. The mypage.sh file contains the html with a section showing the raw iptables output and a nicer table showing the parsed output of miniupnpdctl.
It calls miniupnpd_mypage.sh to get the parsed output. I store my files in /jffs so you will need to search both files and replace /jffs as appropriate.
Notice miniupnpd_mypage.sh is quite slow to run. I tried using cut instead of awk but it made no difference. Any pointers on how to speed up the parsing is welcome as this really is my first attempt at code like that.
Ok I recompiled for x86 and miniupnpdctl outputs the proper information with no leading trash so this is something of a mips issue so far. I had put a space in the name I entered into my config.h #define OS_VERSION variable but it turned out not to be that. It has to be something in config.h though, going to keep working at it. _________________ Eko Builds
Update....Well the developer of miniupnp is working at it, he gave me revised source but the output remained the same. I gave him a log of miniupnpdctl and the mips binaries which he is looking at now. _________________ Eko Builds
Thanks for doing that. Looking at your config file, you have me wondering now; is your miniupnpd version supposed to work on both 2.4 and 2.6 kernel DD-WRT builds?
I am using a WRT610Nv1 so cannot use a 2.6 DD-WRT build. Your makefile links to iptables version 1.4.1 but my DD-WRT build (13401M NEWD-2 Eko) uses iptables 1.3.7. Is that OK? Anything to be concerned about?
To my knowledge the difference in iptables isn't the problem, I told Thomas (miniupnp) what iptables version I am using. If he can't figure it out I will get 1.3.7 and try that, if that doesn't work I'm going to try Tornado's gcc4 toolchain to see if its a gcc3 issue. A lot of bs for such a minor thing, but I want the output of miniupnpdctl also. _________________ Eko Builds
I saw you needed to run a script everytime the firewall runs...
For my asiablock I needed to make some chains which could be referenced in the rc_firewall
I therefore asked eko to give me a "prewall" which I could hook into....
If you create a symbolic link (you need to create the directory if it doesn't exist):
/tmp/etc/config/miniupnp.prewall
which points to your script it will run everytime the firewall restarts and you will be able to do your stuff....
If you have it all working I may incorporate it into my optware script.... _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge