Project

General

Profile

Download (57.9 KB) Statistics
| Branch: | Tag: | Revision:

# Date Author Comment
a97a77a2 03/06/2015 04:27 AM Phil Davis

Be nicer when checking if alias is numeric

Because an ordinary port can be numeric here.
Forum https://forum.pfsense.org/index.php?topic=89906.0

9bfb45ab 03/04/2015 09:46 PM Chris Buechler

Skip any numeric-only aliases in the ruleset to prevent errors from those
who configured them on previous versions where that was allowed. Ticket

751533a2 03/02/2015 06:54 PM Phil Davis

Code style etc inc u

31495068 02/17/2015 05:20 PM Stilez y

Three minor improvements to IP functions

1) Most is_ip***() functions can return 4 or 6 to indicate type of IP, for benefit of calling code (both evaluate to boolean TRUE for backwards compatibility). But is_ipddr() doesn't. Fix is_ipaddr() so it follows same result schema. This saves calling code having to retest same data to determine type....

eaa89cc6 02/11/2015 08:18 PM Ermal Luçi

Ticket #4390 Return only the subnet bits not the full network in cidr format.

75106235 01/31/2015 01:25 PM Pi Ba

speedup 'function is_port($port)' speed by skipping calls to getservbyname when possible

7094c303 01/28/2015 01:38 PM Renato Botelho

Fix #4318 - gen_subnetv4_max() not working on 32bit

0c5dd854 01/16/2015 01:50 PM Renato Botelho

Validate if both IP address and subnet are valid and the same version. Fixes #4223

89f171b0 01/15/2015 07:17 PM Ermal Luçi

Ticket #3997, teach code to track carp through uniqids(). Missing carp GUI changes and upgrade code

b17ac4f7 01/07/2015 11:39 PM Stilez y

"Like with like" - move a few functions to better places in the code (they are placed strangely)

A few functions such as ipcmp(), subnet_expand(), and check_subnets_overlap() are in illogical places - away from all the other ip comparison and subnet basic functions and in the middle of alias handling and interface enumeration....

3bad4691 01/06/2015 05:16 PM Renato Botelho

Remove some extra spaces

3f499654 01/06/2015 05:15 PM Renato Botelho

Fix typo on variable name

e89d2995 01/06/2015 05:14 PM Stilez y

Tighten and IPv6-ify gen_subnet() etc

Tightens, canonicalises and improves for IPv6, the functions
gen_subnet(), gen_subnetv6(), gen_subnet_max(), gen_subnetv6_max()

Changes are transparent to calling code.

Issues:

1) gen_subnet() and gen_subnet_max() will validate both IPv4 and IPv6 as valid args, but will then try to process an IPv6 subnet bitwise as x32 LONG without further checking, causing erroneous but apparently valid responses....

5454fd1b 12/18/2014 07:17 AM Phil Davis

Allow dot at end of FQDN for a host

Redmine #4124 has discussion of this.

a7f79eda 11/27/2014 07:59 AM Ermal Luçi

Use the undocumented -q options of devd to reduce spamming on logs. pfSense scripts do their logging so not necessary to have devd in there.

6bcbd862 11/10/2014 06:31 PM Phil Davis

Add is_unqualified_hostname function

b0d054ca 11/10/2014 02:18 PM Ermal LUÇI

Fixes #3967, configure ip alias on top of carp by joining them to the same vhid as its parent

a68c6785 11/06/2014 09:29 AM Phil Davis

Fix to SMART disk matching

preg_match returns 0 when the string does not match the regex.
0 does not "===" FALSE
So this check is not always working.
preg_match returns 1 when the string matches the regex.
IMO it is better to check for !== 1 - then anything that is not success (0 or false or...) will be unset.

ea20169a 11/04/2014 08:49 PM Jim Pingle

Use a better method of finding disks for SMART.
Old code was inaccurate and also listed entries that were symlinks to other disks

bb67ac32 10/24/2014 02:32 PM Phil Davis

Support converting an IP range to an array of addresses

so that it can be used for expanding ranges in host alias input.

111bea0d 09/11/2014 09:22 PM Renato Botelho

Add a function to redirect to a page passing parameters through POST

9060f420 09/10/2014 08:02 PM Renato Botelho

Change is_port() to only validate a single port, we have is_portrange() for specific cases. Make necessary adjustments after check all is_port() calls. It fixes #3857

971de1f9 07/07/2014 11:06 PM Renato Botelho

Convert almost all /sbin/sysctl calls to php functions

79cd8239 07/07/2014 03:52 PM Renato Botelho

Fix sysctl name

82f75815 07/07/2014 02:05 PM Renato Botelho

Add set_single_sysctl(), a wrapper to set_sysctl() to make it simple to set value of a single sysctl

ff23363d 07/07/2014 01:57 PM Renato Botelho

Add get_single_sysctl(), a wrapper to get_sysctl() to make it simple to get value of a single sysctl

a9e595cc 07/01/2014 04:32 PM Renato Botelho

Remove unused function color()

ec25f18a 05/05/2014 01:57 PM Renato Botelho

Silent kldstat

4845d642 04/29/2014 01:16 PM Jim Pingle

Fix kldstat match/output to check for a running module. It was claiming all modules were loaded so none were being loaded.

384e2647 04/22/2014 06:37 PM Renato Botelho

Fix PBI symlink creation and deletion under /usr/local following .pbiopt files, also drop setup_library_paths() since it's not necessary anymore

302c005e 04/17/2014 08:19 PM Ermal LUÇI

Unload the ZFS module if its not in use to not consume uselss memory

5721595b 03/15/2014 12:08 AM Chris Buechler

standardize on https://www.pfsense.org

04f5393f 02/24/2014 07:03 PM Renato Botelho

Make is_linklocal case-insensitive and fix #3433

037e7a62 02/24/2014 10:57 AM Renato Botelho

Merge pull request #959 from stilez/patch-3

Tighten is_subnet() functions

4ad9a1e7 02/21/2014 02:49 AM Stilez y

Tighten is_validaliasname()

is_validaliasname() treats "empty string" as a valid alias name, it probably shouldn't.

I suspect it also should not allow purely numeric names ('53'), or pure underscore ('_'), or reserved port names ('tcp', 'http'), as valid alias names for other things. Too much risk of issue/ambiguity which isn't helpful in a router/security device, and no obvious upside to it....

a5e2a35f 02/21/2014 02:19 AM Stilez y

Tighten is_subnet() functions

The is_subnet(), is_subnetv4() and is_subnetv6() functions have significant issues in their coding logic.

Issues:

1) Functions use is_numeric(), so they validate invalid bitcount parts such as '1.1.1.1/6.5' or '::8000/94.7' as valid subnet strings...

4caa9574 02/20/2014 01:53 AM Stilez y

Tighten is_numeric()

Improvements:

1) avoids 'expensive' preg_match() and is a more exact test
2) fixes logic whereby an empty string or anything converted to an empty string, is deemed a valid 'numeric' value

(If an empty string can validate as numeric, it's possible that in some cases a number is expected and missing in a string, but not detected, causing malformed rules or subnet bitcounts, and unexpected issues or vulnerabilities)...

873c1701 02/04/2014 02:34 PM Renato Botelho

Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir

59257969 12/24/2013 03:51 PM Ermal LUÇI

Sprinkle some more unsets

66cc4d43 12/23/2013 02:57 PM Ermal LUÇI

Correct displaying states status and avoid divison by zero due to wrong data collected

7a7ba89a 12/07/2013 06:05 PM Ermal LUÇI

Correct curlies yet again

0c21eb70 12/06/2013 07:16 PM Ermal LUÇI

Use _vip as identified for CARP vip IPs to allow easier upgrade code. This way only ipaliases on carp need to be upgraded.

77a341a4 12/06/2013 01:39 PM Renato Botelho

Add a knob to prefer IPv4 over IPv6, it fixes #2833

da6cb29e 12/06/2013 11:41 AM Renato Botelho

Add function is_inrange() that calls is_inrange_v6 or is_inrange_v4 accordingly

049ed50d 12/05/2013 03:41 PM Ermal LUÇI

Correct syntax

b6877e06 12/05/2013 10:51 AM Ermal LUÇI

Handle more carp enahancements for FreeBSD 10. the interface vips will be names $if@$vhid since the interface name is the same as other ips.

f51fa0d4 12/04/2013 11:17 AM Ermal LUÇI

Use proper interface here

7238e0cf 11/28/2013 06:36 PM Ermal LUÇI

Remove references to _vip interface and provide proper configuration for carp on FreeBSD 10. Still some places to deal with this and certainly missing upgrade code

8171a2c2 09/04/2013 08:48 AM Ermal LUÇI

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.

f2cc3344 09/03/2013 03:37 PM Renato Botelho

Fix #3004:

. Create a function to replace strings on deep associative arrays
. Use the recent created function array_replace_values_recursive to fix
VIP interface names instead of touch config.xml directly

517fb89e 08/28/2013 08:01 PM Phil Davis

Improve var names in get_memory

realmem is the amount of actual (real) memory installed - the size of the RAM card - e.g. 256MB
physmem is the amount of memory available to FreeBSD after BIOS, video... has stolen some of realmem.
The variable names currently used are not very helpful for code readability. This standardises them. No functional change here.

bd6ff328 08/20/2013 05:37 PM Renato Botelho

Add scope to target when it is a link-local, it helps ticket #3150

55909a9a 08/16/2013 10:33 AM Ermal LUÇI

Handle link local addresses with embedded interface scope on is_ipaddrv6 and also on dnsmasq which is not yet there for these addresses

ce14e37b 08/14/2013 11:05 PM Ermal LUÇI

Use pfSense module functions for finding interface v6 addresses. The addresses will be not in friendly format as returned by getnameinfo

dd042c51 07/08/2013 03:38 PM Renato Botelho

Implement URL Table aliases for ports instead of IP addresses

079d1952 07/04/2013 01:42 PM Renato Botelho

Add a new alias type, URLs containing Ports

d9f33a7f 07/04/2013 01:40 PM Renato Botelho

Add group_ports()

866b1d61 06/28/2013 06:54 PM Jim Pingle

If the script_name is blank, try another method to locate what our filename is so we don't log an empty script name.

1901463c 05/27/2013 11:29 AM Renato Botelho

Add extra param, off by default, to make get_staticroutes() return hostnames too

86a5e1a8 05/27/2013 10:03 AM Renato Botelho

Fix whitespace and indent

19341491 05/09/2013 11:05 AM Renato Botelho

Create is_linklocal() to validate ll addresses

bcab1b07 03/05/2013 11:49 AM Ermal LUÇI

Make get_static routes behave correctly with aliases

2cf899d3 03/02/2013 10:39 PM un0x

Added IE mobile for WP8

1e5da31d 02/14/2013 07:46 AM Ermal LUÇI

Also do checks for ipv6 on is_ipaddr_configured

d97741c2 02/14/2013 07:39 AM Ermal LUÇI

Check for the right function name since the previous was present in util.inc not interfaces.inc

f1a831b8 02/13/2013 11:00 PM Renato Botelho

Restore require_once(interfaces.inc) on get_configured_ip_addresses(), it's required by get_interface_ip()

a1e4e2a7 02/13/2013 10:40 PM Ermal LUÇI

Two interfaces, carp, ip aliases might be on the same subnet as their parent. What needs to be checked is the ip itself

77daff18 02/13/2013 06:19 PM Ermal LUÇI

Use full path to nohup

fba1804f 02/13/2013 06:19 PM Ermal LUÇI

Assign the output of exec to a var to avoid any issues

e6c60013 02/11/2013 08:35 PM Renato Botelho

Check interfaces and VIP IP address overlap

- Check if interface IP overlaps other interfaces or localip from mpd
based services
- Check if VIPs IP overlaps interfaces or other VIPs address

It fixes #1723

83a12422 02/07/2013 09:46 AM Ermal LUÇI

Correct name of function call and use directly its return value as its boolean as needed. Also correct the function to be more readble and put a note for v4 checks that might be needed

88cc00db 02/07/2013 09:46 AM Ermal LUÇI

Make gen_subnetv6 return a compressed form IPv6 address/net representation. This removes some issues reported during Ticket #2746 and solve the issue on some cases

bd92ede8 02/06/2013 11:38 AM Cyrill B

IPv6 subnet check

dbea91b3 02/06/2013 11:06 AM Cyrill B

Add check_subnetsv6_overlap()

b5b5bcc0 02/04/2013 01:36 PM Ermal LUÇI

Make more strict checks during is_ip* functions. Helps http://forum.pfsense.org/index.php/topic,58399.0.html and http://forum.pfsense.org/index.php/topic,58273.0.html

a2219caf 01/28/2013 01:28 PM Renato Botelho

Add option filter to return_dir_as_array()

- Add a 2nd parameter, default empty, that allows to pass a regex to
filter files it'll return
- While I'm here, simplify code removinf $canadd var

41b4867e 01/24/2013 02:30 PM Renato Botelho

Move is_inrange() to util.inc and rename it to is_inrange_v6()

54404519 01/24/2013 02:28 PM Renato Botelho

Move is_inrange() to util.inc and rename it to is_inrange_v4()

281cf46f 01/16/2013 02:55 PM Ermal LUÇI

Forgotten -n option

5cd73772 01/16/2013 01:21 PM Ermal LUÇI

Use sysctl for this since its better rather than going thorugh dmesg

c4594e36 01/06/2013 03:22 PM Phil Davis

Prevent no such file message when pid file does not exist

5dbd619f 01/05/2013 06:36 PM Seth Mos

Add the PPPoE Server IP addresses to the locally configured addresses, this prevents the HTTP_REFERER check from triggering.

ac94ebd8 12/28/2012 02:14 PM Ermal LUÇI

Just check the file_exists let pkill decide if its a vaild file or not.

1198abf9 11/18/2012 01:10 PM Pi Ba

code comment typo ('log_error' should have been 'log_auth')

96cecadb 11/15/2012 03:50 AM Phil Davis

Add refcount_read to util.inc

Add refcount_read so other code can easily find out how many things have the file system mounted.

1e1e1ec8 11/02/2012 02:50 PM Jim Pingle

Make a function to get the current theme and use it everywhere rather than duplicating code or missing functions. (Fixes forced themes using the wrong theme for login screen)

1f1a08c8 09/14/2012 01:15 AM Jim Pingle

Allow/deny access to DHCP by partial MAC matching.

712eb769 07/31/2012 11:08 AM Ermal LUÇI

Unlock on return

eb295a1b 07/31/2012 11:07 AM Ermal LUÇI

There is no need to remove the @ from function names. Also properly unlock in case of exception. Size is constant and we know it no need for extra call to shmop. Put some more error checking just in case

7074a89a 07/31/2012 07:25 AM Phil Davis

Make access to shared memory atomic

Use lock and unlock to make sure that all incrementing and decrementing of the reference count in the shared memory section is atomic. This ensures that there are not unusual timing conditions that could see 2 callers trying to update the reference count at the same time, which could result in the count never returning to zero. If that happened, then the filesystems would never be restored to read-only. (this is really just relevant to nanobsd) (note that shmop_* calls in php do not do any locking themselves - callers must coordinate their own access to the shared memory section)...

780705e9 07/30/2012 07:18 PM Jim Pingle

Fix negative test

a9f250d6 07/30/2012 07:07 PM Jim Pingle

Pad data when adding to refcount reference, to avoid some oddities with how php handles such data. http://forum.pfsense.org/index.php/topic,51188.msg278141.html#msg278141

6d26ccdb 07/05/2012 06:07 AM Rahman Duran

Fix get_staticroutes() function to handle IPv6 subnets properly

e0a45ce0 07/02/2012 10:00 AM Erik Fonnesbeck

Do not directly print out a message when checking the interfaces, instead saving the list to use later. Display this list before the interface mismatch message. Fixes #2468 and fixes #2531

a2beee75 06/24/2012 07:59 PM Jim Pingle

Catch libraries from subdirectories of PBI lib dirs too

45930696 06/23/2012 05:25 PM Jim Pingle

Setup library paths to include /usr/pbi/*/lib as a last resort to make sure things can find libraries. We may eventually replace this with a better method as this can lead to conflicts, but for now it will allow packages to find their proper libraries.

8b2e2f12 06/11/2012 07:03 AM Ermal LUÇI

Make mac_format aware of cpzone but also friendly to previous code!

805b9ab6 06/11/2012 07:00 AM Ermal LUÇI

Revert "Make mac_format aware of multiple Captiveportal instances"

This reverts commit 54df925b9ea447bdd10f88a886e2ef11d44c3059.

e0ad13cd 06/11/2012 07:00 AM Ermal LUÇI

Revert "Make sure mac_format is always defined"

This reverts commit 56f9032170d3130c2066e5eebbe18b96398073ca.

56f90321 06/10/2012 05:20 PM Cyrill B

Make sure mac_format is always defined