summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pfsense-utils.inc
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused broken functionsdoktornotor2017-02-011-47/+0
| | | | | Not sure what was the idea here, but these are not used anywhere, do nothing as they immediately call ```return false;``` plus the second one is also misnamed. (cherry picked from commit edba33b5a567ab8c9d4827fa26a25bd9649e3fac)
* Force compress for where_is_ipaddr_configured check_localipPhil Davis2017-01-231-1/+1
| | | | (cherry picked from commit f0b1358dfe520ad3b771127127daed970ba2c0a0)
* Force compress for where_is_ipaddr_configuredPhil Davis2017-01-231-0/+4
| | | | (cherry picked from commit cde28bfa0e11f268485ec1f6ccb73a3a2f66448f)
* Always force compress when calling Net_IPv6Phil Davis2017-01-231-2/+2
| | | | (cherry picked from commit 587995fb57f91894d1f8eb6b296a9fe2fa111fac)
* Add requirestatefilter. Implements #7069.derelict-pf2017-01-111-0/+20
| | | | (cherry picked from commit 0a3150896bc412868cfb79473293ed81c87a50a7)
* Add case for 59 to prefix functionsPhil Davis2016-12-271-0/+2
| | | | | Maybe these functions should have a case added for prefix length 59? (cherry picked from commit 231fe9543c696bb2dcdc7f090a561fe74ff8e9a7)
* dhcpv6_pd_str_help add default casePhil Davis2016-12-131-5/+6
| | | | | | When the interface concerned does not yet have its details known (e.g. Track Interface values from upstream have not come yet) then we might as well at least give the caller some reasonable text. e.g. I was adding V6 Static Mappings on an interface that has "Track Interface" and no IPv6 delegation yet. The error message that tries to tell me the type of input I need to put or the static IP offset had no example at all. (cherry picked from commit b790824308b560a38112b5ee94291f6f91107f8c)
* Add PC Engines APU2 to the list of serial-only platformsBrett Keller2016-12-131-1/+2
| | | | | | | | The vidconsole needs to be explicitly disabled for PC Engines APU2, otherwise the comconsole is garbled and mostly unusable during the boot block and boot loader. (cherry picked from commit 089c18f38443e41d5ad5345cd28c43581496cd2c)
* Silence kenv callsRenato Botelho2016-11-241-1/+1
|
* Added addrtolower() function to allow IPv6 addresses to be converted to ↵Steve Beaver2016-11-161-0/+8
| | | | lower case while preserving aliases or other text
* Consider the IPv6 checksum options when dealing with "Disable hardware ↵Luiz Otavio O Souza2016-11-101-0/+12
| | | | | | | | checksum offload". Ticket #5321 (cherry picked from commit 411d4e6e55475cc66b997ca3e47478dbe10b4e1b)
* Fix bug where CARP vip status is incorrent in the interface when moreFredrik Rönnvall2016-11-101-1/+4
| | | | | | than one CARP vip is configured for an interface. (cherry picked from commit 5116a8aa60ad87c0a47aafeca422cc323147ea14)
* Make setup_serial_port() write config files safelyRenato Botelho2016-10-141-72/+91
| | | | | | | | | | 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
* Prevent /etc/ttys to miss essential linesRenato Botelho2016-10-141-3/+40
| | | | | | | 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
* 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.
OpenPOWER on IntegriCloud