Commit Graph

32647 Commits

Author SHA1 Message Date
Renato Botelho
c04887d8fc Enable IPFW on PHP module 2016-10-20 15:50:18 -02:00
Luiz Otavio O Souza
c982fdbc32 Fix is_macaddr().
Hexadecimal numbers without the '0' padding are also valid, e.g:

 a🅱️c:d:e:f
2016-10-20 00:48:32 -05:00
Renato Botelho
94bd7fb3a5 Fix #6828
Until 2.3.x pfSense carried a patch that changed the behavior of 'route
change' command, making it add the route when it fails to change.
On 2.4 this patch was removed and will not be added back. This change
adjust PHP code to deal with route add / change and make it work
without the patch
2016-10-18 11:01:47 -02:00
Renato Botelho
6172f3dedb Make setup_serial_port() write config files safely
This function used to replace /boot.conf, /boot/loader.conf and
/etc/ttys on every call. Depending of the moment a power failure
happens, any of these files can be blank and it'll break console setup
on next boot.

Usa safe_write_file() to save these 3 files to disk to make sure they
are sync'd
2016-10-14 09:04:07 -03:00
Renato Botelho
406ced776e Change safe_write_file $content parameter to accept an array 2016-10-14 08:51:55 -03:00
Renato Botelho
e717f16173 Make $force_binary parameter optional, default to false 2016-10-14 08:51:54 -03:00
Renato Botelho
237d29c490 Prevent /etc/ttys to miss essential lines
We do not create /etc/ttys from scratch but we change it on every boot.
If original file is corrupted for some reason we can end up with a file
missing essential lines. Added a check to verify if these lines are
missing and add them back in this case
2016-10-14 08:51:50 -03:00
jim-p
b533da8532 Fix up help text on outbound NAT. 2016-10-13 11:08:12 -04:00
jim-p
7ea6dabecb Clarify source port warning when editing a firewall rule. 2016-10-13 10:42:42 -04:00
jim-p
d02ee1387f In the setup wizard, do not change the DHCP range if it is already set inside the new subnet. Otherwise it will overwrite a range set manually from the DHCP settings or the console when the wizard is run later. Fixes #4820 2016-10-13 10:21:30 -04:00
Renato Botelho
77179b262c Merge pull request #3190 from phil-davis/dhcpv6 2016-10-13 10:39:41 -03:00
Renato Botelho
8c48089f83 Add extra validations on is_inrange_v[46]
Verify if addresses are valid IP address before convert them to make
numeric comparison.

While here, adjust indent.

Inspired by: @phil-davis patch at PR #3189
2016-10-13 10:36:03 -03:00
NOYB
ef30fa510f Replace underscore with hyphen in option names
Thanks Jorge

(cherry picked from commit 30786a9d24)
2016-10-13 10:25:31 -03:00
Renato Botelho
bd9e1327d1 Merge pull request #3186 from phil-davis/unlink_if_exists 2016-10-13 10:24:32 -03:00
Renato Botelho
42ebf952de Restore accidentally removed block
On dc61252ae the code used to restore dhcp6 leases when platform was
nanobsd was removed, but this code is supposed to run on full install
when it's configured to use MFS /tmp. Restored it, adjusting indent,
and add the correct conditional to run on MFS /tmp

Spotted-by:	@phil-davis
2016-10-13 10:15:40 -03:00
Renato Botelho
b76b52aef0 Merge pull request #3180 from valneacsu/fix_wifi_1st_VAP_params 2016-10-13 09:48:04 -03:00
Phil Davis
3707ffc415 DHCPV6 only check VIPs in range if range valid
If the user has input invalid values into range from and to, then there
is no point checking any IPv6 VIPs to see if they fall in the range.
None of them would be "in range" because the specified range is not even
valid.
2016-10-13 11:52:59 +09:30
Phil Davis
d96a39ba30 Make unlink_if_exists return true/false
This allows the caller to do a single "atomic" call to unlink_if_exists.
If it returns true, then they know that the file existed and that it has
been unlinked successfully.
This should help avoid race conditions where multiple code paths try
sequences like:

if (file_exists("somefile") {
unlink("somefile");
do_other_stuff();
}

in the case where we really only want do_other_stuff() to happen for the
code path that is the first one to actually unlink the file.
2016-10-13 11:01:30 +09:30
Valentin Neacsu
0186b761e0 Remove commented code 2016-10-12 21:38:25 +01:00
Renato Botelho
4b65536ac4 Update pot 2016-10-12 16:30:22 -03:00
Renato Botelho
dc61252ae4 Deprecate nanobsd platform and remove all conditionals that uses it 2016-10-12 16:29:49 -03:00
Renato Botelho
9ed7f8f635 Retire rc.nanobsd_switch_boot_slice 2016-10-12 16:23:15 -03:00
Renato Botelho
0c2dffb027 Define a single value for 'default_config_backup_count' 2016-10-12 16:23:14 -03:00
Renato Botelho
b55c6b825d Remove unused global var 'hidebackupbeforeupgrade' 2016-10-12 16:23:14 -03:00
Renato Botelho
1289c0c17c Remove all calls to conf_mount_r* functions 2016-10-12 16:23:14 -03:00
Renato Botelho
eec44c6470 Retire restart_httpd.php 2016-10-12 16:23:13 -03:00
Renato Botelho
60f164f33e Retire cdrom platform support 2016-10-12 15:27:09 -03:00
Renato Botelho
f68a881cc6 Remove unused global config item 'update_manifest' 2016-10-12 15:12:26 -03:00
Renato Botelho
3f4a0df92c Remove hideplatform global config and all uses of it 2016-10-12 15:10:20 -03:00
Renato Botelho
337e6a26bf Remove unused global item 'nopkg_platform' 2016-10-12 15:09:21 -03:00
Renato Botelho
a5e59e2518 Retire refcount functions. They are not used anymore 2016-10-12 15:03:58 -03:00
Renato Botelho
9f08c2b001 Retire diag_nanobsd.php 2016-10-12 15:02:20 -03:00
Renato Botelho
ffab5cb4df Obsolete conf_mount_ro() and conf_mount_rw()
Now that nanobsd is gone these functions are not necessary anymore.
Keep them around until all calls are cleaned up
2016-10-12 14:59:38 -03:00
Renato Botelho
dd3d6c8a15 Merge pull request #3151 from EdHurtig/eng/6806 2016-10-12 13:20:42 -03:00
Renato Botelho
bc0a0c2e63 Merge pull request #3154 from PiBa-NL/filenoticeBR 2016-10-12 13:18:26 -03:00
Renato Botelho
4e04d89673 Simplify tcsh prompt and respect default terminal colors 2016-10-12 13:15:55 -03:00
Renato Botelho
d8746bc0b7 Merge pull request #3140 from stilez/patch-39 2016-10-12 12:51:16 -03:00
Renato Botelho
ceea9d9cfb Merge pull request #3156 from stilez/patch-43 2016-10-12 12:45:51 -03:00
NOYB
53b9a2ac97 Report quantity of files being installed by minimal and diff options.
Also consolidate some unset commands.

(cherry picked from commit 32912ae833)
2016-10-12 12:41:31 -03:00
NOYB
b19c80332c Support minimal and diff options combo rather than diff superseding minimal (sync both updated and diff files).
Break verbose option in two for showing files and/or constructed command.  (--show_files, --show_command)
Don't save new commit ID if dry run. (--dry-run)

(cherry picked from commit a6fd4c0ff4)
2016-10-12 12:41:31 -03:00
Renato Botelho
9eab84482e Merge pull request #3169 from valneacsu/fix_wifi_channel_change 2016-10-12 12:39:29 -03:00
Renato Botelho
ec6e6666aa Merge pull request #3171 from phroggster/patch-2 2016-10-12 12:37:45 -03:00
Renato Botelho
83f7fabde9 Merge pull request #3177 from brunostein/fix_authmode_translated 2016-10-12 12:33:33 -03:00
Renato Botelho
90d0e0e057 Merge pull request #3179 from valneacsu/fix_wifi_settings_overwrite 2016-10-12 12:30:39 -03:00
Renato Botelho
58c0e164a9 Merge pull request #3184 from NewEraCracker/gwlb-fix 2016-10-12 12:21:04 -03:00
Renato Botelho
d3007fbe03 Remove invalid parameter --flash-size 2016-10-12 11:48:15 -03:00
NewEraCracker
54596b8867 Improve gwlb.inc notification mechanisms
1) Unlink earlier to reduce the chances of any concurrency issues;
2) Translate and improve output of available notification;
3) While I'm here, fix whitespace and improve PHP syntax.
2016-10-12 15:08:59 +01:00
Renato Botelho
3154be5410 Simplify TARGET and TARGET_ARCH initialization 2016-10-11 15:58:07 -03:00
Renato Botelho
2ac4be3a6b Remove nanobsd related code from build scripts 2016-10-11 15:57:17 -03:00
Renato Botelho
bd4e01942d Remove unused variable 2016-10-11 13:38:09 -03:00