Commit Graph

32670 Commits

Author SHA1 Message Date
Renato Botelho
3e80d64e92 Make sure we consume staging packages on build process after pfSense-repo became a package 2016-10-26 16:17:50 -02:00
Renato Botelho
349b210203 ARM kernel is not compressed, deal with that 2016-10-26 15:07:16 -02:00
Renato Botelho
892d881638 Merge pull request #3201 from phil-davis/patch-3 2016-10-25 13:55:45 -02:00
Christoph Filnkößl
0e0f580d39 dyndns: add header processing in curl
some dyndns implementations rely on the correct HTTP header being set. the information was lost and now fixed.
2016-10-25 13:47:57 -02:00
Renato Botelho
f85a1e533b Merge pull request #3192 from PiBa-NL/xmlrpc-auth 2016-10-25 13:42:38 -02:00
Renato Botelho
1ace41be98 Merge pull request #3200 from phil-davis/patch-2 2016-10-25 13:37:45 -02:00
Renato Botelho
bc6cefb787 Merge pull request #3197 from phil-davis/dhcp6 2016-10-25 13:34:22 -02:00
Renato Botelho
4a1dc6834d Merge pull request #3205 from phil-davis/patch-7 2016-10-25 13:25:05 -02:00
Renato Botelho
99a537e1dd Make sure filterdns is disabled when CP zone is disabled 2016-10-25 09:06:18 -02:00
Luiz Otavio O Souza
9945720f2e Fix the ipfw rule to use the table cp_ifaces and not the interface cp_ifaces. 2016-10-24 20:22:51 -05:00
Renato Botelho
a4aebf446a Stop using -y on filterdns call 2016-10-24 19:26:37 -02:00
Renato Botelho
517b893eec Rework captive portal to run with stock IPFW (round 1)
- Remove use of IPFW context
- Create a rule that will skip to proper rule for each cp zone
- Use new PHP module functions wherever is possible
2016-10-24 19:22:00 -02:00
Steve Beaver
6344be46d4 REmove accidental text 2016-10-24 17:09:29 -04:00
Steve Beaver
a22947a498 Provide conrol on system.php to allow display of hostname on login banner 2016-10-24 11:30:22 -04:00
Steve Beaver
616724395a Added hostname to login page.
Option control required
2016-10-24 11:06:38 -04:00
Luiz Otavio O Souza
92130da3b5 Update the variable with the round() return otherwise it does not has any effect.
Found while testing Ticket #6272.
2016-10-23 23:09:44 -05:00
Phil Davis
b7f2ebb544 Fix #6872 CP bandwidth 0 is no valid
The front-end validation prevents zero from being entered. "Leave empty" is the way to specify no limit.
2016-10-24 10:02:31 +09:30
Renato Botelho
8fc25403b3 Revert "Revert "Enable IPFW on PHP module""
This reverts commit 9fdd0c7ebb.
2016-10-21 18:15:52 -02:00
Renato Botelho
9fdd0c7ebb Revert "Enable IPFW on PHP module"
This reverts commit c04887d8fc.
2016-10-21 09:32:13 -02:00
Renato Botelho
c04887d8fc Enable IPFW on PHP module 2016-10-20 15:50:18 -02:00
Phil Davis
eb01f06578 Improve IPv4 address validation for services_dhcp
The input pattern that goes with Form_IpAddress by default allows for IPv4 and IPv6 valid characters. The back-end validation here is checking for IPv4 addresses, so it seems reasonable that the front-end input pattern checks might as well be restricted to the IPv4 valid characters. Unneeded setPattern have also been removed.
The exception is Gateway, where the special string "none" is allowed, so I just left the setPattern as it is (yes, it could be modified to only allow the letters "n" "o" and "e").
2016-10-20 17:34:44 +09:30
Phil Davis
ebfcfeb59a Fix display advanced after input error for system_gateways_edit
Use case:
1) Edit a gateway that has no advanced settings (i.e. the Advanced section does not need to open on page load) - that works fine.
2) Modify the Gateway IP Address to something invalid like 1:2::z
3) Press Save
The error is shown - "A valid gateway IP address must be specified" - good.
The Advanced section is shown - not good.

The problem is that after POSTing the page, and the resulting validation, finding an input error, and re-displaying the page, each of the $pconfig keys is set, even though set to the empty string "". So the isset() tests are true, and it gets the wrong idea.

We only care about these parameters if they are not "". In this case !empty() gives the correct result, because although a value of 0 will be considered empty, 0 is not allowed by the front-end of the UI anyway (as it happens, these parameters are not allowed to be 0), so we never get that case. And by the way, I generally hate empty() because of having to think of all its quirks.
2016-10-20 16:48:30 +09:30
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
Phil Davis
2355c154b7 Better handle no dhcpv6 leases file 2016-10-19 12:13:02 +09:30
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
PiBa-NL
dc5f639f83 xmlrpc, use authentication through the basic auth header instead of extra user/pass parameters 2016-10-15 16:58:05 +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