summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pfsense-utils.inc
Commit message (Collapse)AuthorAgeFilesLines
* Move copyright from ESF to NetgateRenato Botelho2016-09-061-1/+1
|
* Code style and commentsPhil Davis2016-08-161-1/+1
| | | | | | No functional change - just making style consistent (cherry picked from commit 9d3e8723171c727cf43338bd8e95ab2bb7e6a66c)
* Fix typo, LT2P->L2TPjim-p2016-08-021-2/+2
|
* Review license / copyright on all files (1st round)Renato Botelho2016-07-141-50/+50
|
* Leave an empty file for URL Table aliases that return an empty file, and ↵Chris Buechler2016-07-061-0/+2
| | | | include it in the ruleset regardless so it doesn't generate any filter errors. Ticket #6181
* Protect get_dir from causing PHP errorsNewEraCracker2016-07-051-0/+3
| | | | https://forum.pfsense.org/index.php?topic=114570.0
* Feature #6388 custom GUI preference settings per userPhil Davis2016-06-301-0/+236
|
* Update include() to include_once()Phil Davis2016-06-281-1/+1
| | | | | | | | | | For safety, use include_once() when including various "side" files. There are a couple of instances of include("guiconfig,inc") that I changes to use require_once() to be consistent with everywhere else. The remaining cases of include() are just (hundreds of) head.inc and footer.inc - those are only at the start/end of the ordinary top-level interactive PHP files. There is no nested interaction of those to think about, so that should be fine.
* missing "("stilez2016-06-221-1/+1
| | | | (cherry picked from commit 70381d4803b9424c1a3f3ef518d8243062452d77)
* optional arg for old behaviourstilez2016-06-221-3/+4
| | | | (cherry picked from commit cf63f1638aab685cc956502f5ddd862a10bf3ff8)
* Simplify convert_seconds_to_hms() and show days for large numbers of hoursstilez2016-06-221-22/+12
| | | | | | | 1) Function can be simplified and all "if" statements removed, using intdiv (or casting result as int for PHP < 7) and % for calcs and sprintf for padding. 2) Input validity check before trying to convert format 3) If time represented is large (eg uptime might be several months) then hours becomes unhelpful, it's clearer to show "4921:02:06" as "205d 01:02:06". (Leading "days" value not shown unless >=1 for simplicity) (cherry picked from commit 0bde6d1057ed39c8ef650a5a505cf9ae5eb7199e)
* Add a check to see if the file exists before running filesize on it, to ↵Chris Buechler2016-05-311-0/+5
| | | | avoid PHP error.
* Fix this missed one.NOYB2016-05-251-1/+1
| | | | (cherry picked from commit f42ef69ab518237260a2e129cbdf391549c003ad)
* Firewall / Aliases / Edit - New URL Table Alias TypeNOYB2016-05-251-11/+11
| | | | | | Make the code cleaner and easier to follow by using the same alias type designations as config. (cherry picked from commit ebe833f6a9463b0e4add1d97c360af4a682d1add)
* Firewall / Aliases / Edit - New URL Table Alias TypeNOYB2016-05-251-2/+3
| | | | | | Need to pass alias type to process_alias_urltable() function when creating a new url table alias because it is not yet set/available from config. So the alias_get_type() function can't be successfully used yet. (cherry picked from commit 3b07f4feaf35e70700082240ef03966f74f5df97)
* Alias Tables RAM Disk StoreNOYB2016-04-181-1/+40
| | | | | | | | | | If ramdisk is enabled keep a copy of the alias tables to restore at boot time. Otherwise unpredictable behavior may occur due to some aliases not being available when the firewall rules load. Because alias tables are typically somewhat static, the following strategies are employed to keep write cycles to a minimum for SSD and flash drive type devices friendliness. 1) Back up during reboot/shutdown only if a backup copy of the alias table does not already exists. This is typically during the reboot when ramdisk is first enabled. 2) Update the backup copy only when the alias table is updated with a new download, typically 1 or more days, as configured in the firewall alias. (cherry picked from commit 03afdafaab503af22ce5c98ad06b9f6bbc459974)
* Don't try to put the file contents in place if file is empty. Ticket #5982Chris Buechler2016-03-111-1/+7
|
* Diagnostics / Tables - URL Table AliasesNOYB2016-02-291-20/+26
| | | | | | | | Handle URL table aliases similar to bogons tables. Suppress record remove buttons. Update (download) only the selected URL table alias instead of all of them. Retain full line comments in downloaded URL table files so we can view and use them. When URL table file full line comments are present, provide view option in info box. Increase ability to extract last update date from wider variety of URL table file comments.
* Ticket #3029Renato Botelho2016-02-191-0/+36
| | | | Fix DHCPv6 GUI to work with PD length != 64
* Ticket #3029Renato Botelho2016-02-191-6/+46
| | | | Teach merge_ipv6_delegated_prefix() to deal with other PD sizes
* Ticket #3029Renato Botelho2016-02-191-0/+8
| | | | | | | Import patch from @Robert-Nelson to enable DHCPv6 Server/RA to interfaces configured to track DHCP-PD This patch only works for PD with length 64
* Internationalize etc inc i through sPhil Davis2016-02-181-38/+38
|
* Sync RCC detection with RELENG_2_2Renato Botelho2016-02-171-0/+2
|
* Simplify and correct the comments in get_carp_interface_status().Luiz Otavio O Souza2016-02-161-21/+18
|
* This seems to have negatively impacted LAGG/VLAN configs. Revert "Only set ↵jim-p2016-02-151-9/+7
| | | | | | IFCAPS where they're not already set correctly. Ticket #5887" This reverts commit 7f283fab1b18bb575537bb8498b16a6b1b6d0251.
* Fix the returned string when no status is found for this CARP.Luiz Otavio O Souza2016-02-131-12/+6
| | | | No functional change.
* Only set IFCAPS where they're not already set correctly. Ticket #5887Chris Buechler2016-02-121-7/+9
|
* If URL table file size is 0, force update. Ticket #5848Chris Buechler2016-02-121-1/+1
|
* add an option to only validate URL tables, so stray files aren't left behind ↵Chris Buechler2016-02-121-2/+4
| | | | when input validation fails. Ticket #5848
* Parse URL Table alias downloads with parse_aliases_file to ensure only valid ↵Chris Buechler2016-02-121-5/+9
| | | | contents. Ticket #5848
* Remove process_alias_unzip, which never worked because of variable typo (at ↵Chris Buechler2016-02-101-37/+0
| | | | a minimum) and wasn't documented as an available feature so people don't expect to be able to use it.
* Return false if download fails in process_alias_urltable so input validation ↵Chris Buechler2016-02-101-0/+2
| | | | based upon it works. Ticket #5848
* Match this to max_input_vars for large aliasesChris Buechler2016-02-091-1/+1
|
* Correct variable in error logChris Buechler2016-02-091-1/+1
|
* Don't try to process aliases whose downloads have failed in ↵Chris Buechler2016-02-091-1/+4
| | | | update_alias_url_data(). Ticket #5848
* Sync up download_file_with_progress_bar with download_file. The former is no ↵Chris Buechler2016-02-091-8/+15
| | | | longer used in the base system, but still in some packages.
* Review of CARP uniqid changes.Luiz Otavio O Souza2016-02-091-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that current CARP implementation is not much different from an IP alias. This commit converts the IP alias to also use the CARP uniqid scheme, this simplify the code in all other places because now we have only two different cases to deal with: - A friendly interface name (lan, wan, opt1, etc.); - A Virtual IP - VIP alias (_vip{$uniqid}) - CARP or IP Alias. The parent of a CARP is always a friendly interface. The parent of an IP alias can be a friendly interface or a CARP (this is the only case of recursion of a VIP). This commit removes a few cases where CARP were still considered a interface (the old CARP implementation), fixes all the wrong cases of strpos() being used to detect a VIP address (wont work as it returns '0' which fails when tested as 'TRUE'), review the usage of CARP and IP alias as services bind addresses, fixes general issues of adding and editing VIP addresses. The following subsystems were affected by this changes: - IPSEC; - OpenVPN; - dnsmasq; - NTP; - gateways and gateway groups; - IPv6 RA; - GRE interfaces; - CARP status; - Referrer authentication. Fixes (and/or revisit) the following tickets: - Ticket #3257 - Ticket #3716 - Ticket #4450 - Ticket #4858 - Ticket #5441 - Ticket #5442 - Ticket #5500 - Ticket #5783 - Ticket #5844
* Return false in download_file rather than the failed status code when a ↵Chris Buechler2016-02-091-1/+7
| | | | download fails. Return would always evaluate to true previously though other parts of the code expect a false value when a download fails. related to Ticket #5848
* Remove attributions of return code not being used at allRenato Botelho2016-01-221-4/+4
|
* Fix #5690:Renato Botelho2016-01-211-5/+15
| | | | | | - Remove parameters from set_language() - Add a global variable for default language - add env var for LANG, otherwise it won't work
* Update license on files from /etc/incRenato Botelho2016-01-151-22/+42
|
* HTML Compliance - System / Advanced / Firewall and NATNOYB2015-12-231-1/+1
| | | | | | | | | | | | | | Bad value 200000↩ for attribute placeholder on element input: Line feed not allowed. <input class="form-control" name="maximumtableentries" id="maximumtableentries" type="text" placeholder="200000↩"> Element ul not allowed as child of element span in this context. Contexts in which element ul may be used: Where flow content is expected. Content model for element span: Phrasing content. Close div tag Close php tag
* No need to set LANG env var hereRenato Botelho2015-12-161-1/+0
|
* Remove all pfSense_MODULE and pfSense_BUILDER_BINARIES definitions, whatever ↵Renato Botelho2015-12-151-7/+0
| | | | was the reason they were added, it was never finished and it's not being used
* Remove dead code, we only have UTF-8 todayRenato Botelho2015-12-141-60/+0
|
* Update pfsense-utils.incBBcan1772015-12-131-1/+1
| | | | | | | | | When installing packages, an extra line break is added by the "\r" ... echo "\r{$status}"; The $status string typically contain a trailing "\n" as required. This allows to print a message in two steps. Writing configuration... done. 1) print "Writing configuration..." 2) print "done" after the command completes.
* Code style and white space in etcPhil Davis2015-12-101-2/+4
|
* Fixed #5532Stephen Beaver2015-11-301-1/+1
|
* Mistake in "pfsense-utils.inc"Colin Fleming2015-11-291-1/+1
| | | Sorry, missed a semi-colon!
* Type up SCRIPT tagsColin Fleming2015-11-291-2/+8
|
OpenPOWER on IntegriCloud