Remove SPD when disable phase2, it fixes #2719
Fixes #3173 if any port information exists on the rule than put it on the NEGATE rule generated.
filter_generate_port error log function name

Absolutely minor adjustment to make the error log message refer to the new function name.
Merge pull request #797 from phil-davis/master

filter_generate_port error log function name
Sprinkle some unsets to reduce footprint and correct some whitespaces
Make the operation of saving old rule nearby the writing operation to be logical to spot
Add safety belts to code in rc.openvpn to avoid php errors to leave stale locks around
Introduce two new functions to be used on locking.

- try_lock: used for trying to get an EXCLUSIVE lock for a specified timeout by default of 5
- unlock_force: which just releases any locks held on a specified lock

Use this new functions on rc.openvpn to avoid spurious stale locks around.
Related to Ticket #3045 avoid races in the ntpdate_sync_one script due to killall returning without the process really exiting.
Actually the / here is not needed.
When the v4 wan is dynamic and v6 is type dhcp and v6 information is retrieved through v4 link than trigger dhcp6c reconfiguration.