UPnP support
-
@bradenmcg:
It's still a pain in the ass to install on embedded though - that's the last thing I'd like to see resolved but I understand if it doesn't make it to 1.0 final. As long as there is some way (even unsupported) to make it work on embedded I stay happy. :D
I added the miniupnpd files to the 1.0-RELEASE image.
http://wgnrs.dynalias.com:81/pfsense/pfSense-Embedded-1.0-RELEASE-Miniupnpd.img.gz
I also updated the script sh-custom-image.sh for 1.0-RELEASE see
http://forum.pfsense.org/index.php/topic,1788.msg13972.html#msg13972
-
Very cool, thanks rsw686!
I'm guessing that from RC3 I can't upgrade to 1.0 final, right? Need to pull the CF out of the box again and flash?
-
@bradenmcg:
Very cool, thanks rsw686!
I'm guessing that from RC3 I can't upgrade to 1.0 final, right? Need to pull the CF out of the box again and flash?
I thought I saw an upgrade, but honestly since your going from prerelease to an actual release I would just flash it.
-
Upgrades are available at the mirrors too: http://pfsense.com/mirror.php?section=updates
-
I thought I saw an upgrade, but honestly since your going from prerelease to an actual release I would just flash it.
On your recommendation I reflashed with your pre-built embedded miniupnp image…
It's working, but I'm getting a couple odd behaviors on startup.
During boot, the synching packages/startup scripts runs miniupnp.sh twice in a row. Is this by design?
The other thing I'm seeing is that on the console, the menu system comes up and sits for a while, and then I see the message "Terminated" and the menu redisplays itself.
I imagine there's something going on behind the scenes but i'm not seeing anything in the syslog, at least not through the web.
-
@bradenmcg:
I thought I saw an upgrade, but honestly since your going from prerelease to an actual release I would just flash it.
On your recommendation I reflashed with your pre-built embedded miniupnp image…
It's working, but I'm getting a couple odd behaviors on startup.
During boot, the synching packages/startup scripts runs miniupnp.sh twice in a row. Is this by design?
The other thing I'm seeing is that on the console, the menu system comes up and sits for a while, and then I see the message "Terminated" and the menu redisplays itself.
I imagine there's something going on behind the scenes but i'm not seeing anything in the syslog, at least not through the web.
The two miniupnp.sh scripts starting is a bug in 1.0-RELEASE. See http://cvstrac.pfsense.com/tktview?tn=1124 It should say stopping miniupnpd.sh and then starting miniupnpd.sh. The stop / start code is right but the message displayed is wrong.
Looks like this right
Executing rc.d items…
Starting /usr/local/etc/rc.d/miniupnpd.sh...
done.
Starting /usr/local/etc/rc.d/miniupnpd.sh...
done.Not sure on the menu issue, but thats not from miniupnpd. Everything is the same as the 1.0-RELEASE image except for the miniupnpd files and the miniupnpd installed packages section in the config. The files don't modify the system files, they are just added to the proper directorys just as if you installed it from the package manager.
How long does it take to say terminated. I'm assuming this is on the serial console as its the embedded image. You using hyperterminal in windows or some other terminal program. I am actually curious if mine does that as well. I just never leave it open.
EDIT:
I just looked at status.php in DMESG. I am getting the terminated. Must be something changed in 1.0-RELEASE as I don't remember seeing that before.
Enter an option:
TerminatedThe Terminated is the /etc/rc.initial script being terminated and then restarted since it is in a loop. Something is killing the process.
-
You know the terminated on the console issue isn't a bug. Mine shows terminated 4 times in dmesg on the status.php page. However it looks to be linked to the dhcp renewal on the wan interface. Which makes sense as the menu shows the current ip address for the WAN interface so it gets termianted and restarted to reflect the current WAN IP.
-
Actually, it looks like this…
Executing rc.d items...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
done.There's no "done" between each invocation of the script, which I found a little odd (and why I considered it might be a problem at all).
The "Terminated" thing makes sense though, I didn't really investigate it too hard as I've been playing Xbox instead (yay UPnP). ;D
-
@bradenmcg:
Actually, it looks like this…
Executing rc.d items...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
done.That's a typo. It's purely cosmetic and is already fixed in CVS. I wouldn't waste your time on chasing down a bug there ;) Thanks
–Bill
-
@bradenmcg:
Actually, it looks like this…
Executing rc.d items...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
Starting /usr/local/etc/rc.d/miniupnpd.sh...
done.
There's no "done" between each invocation of the script, which I found a little odd (and why I considered it might be a problem at all).The "Terminated" thing makes sense though, I didn't really investigate it too hard as I've been playing Xbox instead (yay UPnP). ;D
Are you sure you just didn't miss the done. Check status.php at the bottom in the DMESG section. Its not really possible for it not to show done. Look at the code.
for FILE in /usr/local/etc/rc.d/.sh; do
echo -n " Starting ${FILE}…"
sh $FILE stop >>/tmp/bootup_messages 2>&1 &
echo "done."
done
for FILE in /usr/local/etc/rc.d/.sh; do
echo -n " Starting ${FILE}..."
sh $FILE start >>/tmp/bootup_messages 2>&1 &
echo "done."
doneReguardless your install seems to be working just fine as your playing xbox. ;)
-
On miniupnpd settings page if I select two interfaces say LAN and OPT1 when it writes that setting to the config.xml file it stores it as lan,opt1 instead of lan opt1. Due to this the miniupnpd.inc script fails. Also when returning to the miniupnpd settings page it will not show any interfaces selected.
A temp fix I am using is putting the following code in miniupnpd.inc above if ($interface_array)
/* for some reason interface array is stored as lan,opt1 not lan opt1 */
$interface_array = str_replace(","," ",$interface_array); -
Are you sure you are on 1.0-RELEASE? I fixed that bug recently…
-
Are you sure you are on 1.0-RELEASE? I fixed that bug recently…
Yes I am on the 1.0-RELEASE.
1.0-RELEASE
built on Fri Oct 13 03:43:48 UTC 2006 -
I fixed multiple bugs in the miniupnpd.inc files. I have attached the complete file along with diff -rub
-no interfaces selected on miniupnpd settings page does not disable miniupnpd
-stop service then delete rc file as miniupnpd is not wanted
-since disabled interfaces are listed on the miniupnpd settings page a user can select one
-do not run miniupnpd on that interface if there is no ip address as parameters are invalid
-added status messages so users can see whats going on in the system log when syncing the package
-lets say user restores config with invalid interface convert_friendly_interface_to_real_interface_name will return the friendly name if it cant convert to the real interface
-if statement only checked if it was blank not for above case, fixed if statement
-my way of seeing if existing miniupnpd service running was long
-changed from ps -A | grep ….. to pgrepIf multiple interfaces are selected on the miniupnpd settings page miniupnpd will correctly run until reboot due to the bug I mentioned in the post above. Once that issue is fixed miniupnpd will work correctly on reboot with multiple interfaces.
Also in miniupnpd.xml we do not need the custom_add_php_command. We already have the custom_php_install_command and custom_php_resync_config_command sections. This just runs the sync_package_miniupnpd twice.
miniupnpd.inc.txt
miniupnpd.xml.diff.txt
miniupnpd.inc.diff.txt -
On miniupnpd settings page if I select two interfaces say LAN and OPT1 when it writes that setting to the config.xml file it stores it as lan,opt1 instead of lan opt1. Due to this the miniupnpd.inc script fails. Also when returning to the miniupnpd settings page it will not show any interfaces selected.
A temp fix I am using is putting the following code in miniupnpd.inc above if ($interface_array)
Look at this more I think the config file is correct being lan,opt1. However when it reads it back its not converting it into an array. Its just giving back the text. I'm assuming it looks for the xml field name being _array and then does this conversion. Otherwise it wouldn't know if the field is text or an array.
If its not suspossed to do a conversion then the pkg_edit page needs to conver the , delimited list into the list box and the miniupnpd.inc file will have to be modofied to convert the , delimited list into an array.
-
On miniupnpd settings page if I select two interfaces say LAN and OPT1 when it writes that setting to the config.xml file it stores it as lan,opt1 instead of lan opt1. Due to this the miniupnpd.inc script fails. Also when returning to the miniupnpd settings page it will not show any interfaces selected.
A temp fix I am using is putting the following code in miniupnpd.inc above if ($interface_array)
Look at this more I think the config file is correct being lan,opt1. However when it reads it back its not converting it into an array. Its just giving back the text. I'm assuming it looks for the xml field name being _array and then does this conversion. Otherwise it wouldn't know if the field is text or an array.
If its not suspossed to do a conversion then the pkg_edit page needs to conver the , delimited list into the list box and the miniupnpd.inc file will have to be modofied to convert the , delimited list into an array.
Look at how the snort, routed, and olsr packages handle interfaces.
–Bill
-
On miniupnpd settings page if I select two interfaces say LAN and OPT1 when it writes that setting to the config.xml file it stores it as lan,opt1 instead of lan opt1. Due to this the miniupnpd.inc script fails. Also when returning to the miniupnpd settings page it will not show any interfaces selected.
A temp fix I am using is putting the following code in miniupnpd.inc above if ($interface_array)
Look at this more I think the config file is correct being lan,opt1. However when it reads it back its not converting it into an array. Its just giving back the text. I'm assuming it looks for the xml field name being _array and then does this conversion. Otherwise it wouldn't know if the field is text or an array.
If its not suspossed to do a conversion then the pkg_edit page needs to conver the , delimited list into the list box and the miniupnpd.inc file will have to be modofied to convert the , delimited list into an array.
Look at how the snort, routed, and olsr packages handle interfaces.
–Bill
I'm assuming this is the key line to converting the , delimited list to an array
$ifarr = explode(",", $config['installedpackages']['routed']['config'][0]['iface_array']);
I will test this out.
-
I have miniupnpd working with multiple interfaces. I have attached the full file along with the diff -rub files. Not sure if you are going to, but it would be great if this could be committed to help others out.
The only issue left is if you select multiple interfaces when returning to the miniupnpd settigns page none are selected.
miniupnpd.inc.txt
miniupnpd.inc.diff.txt
miniupnpd.xml.txt
miniupnpd.xml.diff.txt -
In case anyone cares, I happened to pass by http://miniupnp.free.fr/files/ and noticed a new update (miniupnpd20061018.tar.gz), here's the relevant changes from the Changelog.
2006/10/18: Added an INSTALL file 2006/10/13: Added the possibility to change the notify interval
;D
-
Almost there rsw. <interface_array>is an array type in xmlparse.inc. Rename that variable to iface_array or somethig in both the .inc and .xml file and you should see the settings you save be reflected when you reload the config page.
–Bill</interface_array>