Commit Graph

24941 Commits

Author SHA1 Message Date
Phil Davis
db949a1904 Standardise power mode selection boxes
I noticed that this looked a little odd, the boxes for AC and Battery Power Mode are 1 after the other on the same line, then the 3rd box for unknown power mode is on a new line.
Maybe make them all on their own line, like this?
2015-03-03 08:07:08 -03:00
Phil Davis
bd5a82681d Add missing BR tags and fix display with pfsense_ng_fs theme
Fixes #4481
Similar issue to commit 5cfd948144
Note: services_dhcpv6_edit.php - these fields are not present so nothing to edit/fix.
2015-03-03 08:05:52 -03:00
Phil Davis
603a97cb57 Be safe use require_once in zeromq
I was testing code and just doing stuff like:
require_once("zeromq.inc");
in Diagnostics->Command Prompt, PHP Execute
That brings an error because underneath that PHP Execute code it has already included auth.inc
I guess zeromq.inc is used quite separately to the rest of the system, and must be OK just having a "require" here. But it seems safer to always use require_once, just in case it gets called in a new way/sequence.
Comments welcome.
2015-03-03 08:01:40 -03:00
Chris Buechler
911cc213ab Remove "Prefer old SA" option, and ignore it in all existing configurations. Breaks things in many cases with strongSwan. For the very rare circumstances where this is actually desirable, it's just a sysctl that can be set in tunables. 2015-03-03 00:18:50 -06:00
Phil Davis
c8703520b5 Ancient bug on upgrade_014_to_015
This code looked silly the way it was, with the construct:
$var = $var;
unset($var);

Seems it was accidentally changed to this way many years ago by 588a183b0e
IMHO we want to do the conversion to $config['system']['gateway'] here so that later config conversion will then process it as expected.
Note that in a current (2.2) config there is not $config['system']['gateway'] but that is switched over later in upgrade_021_to_022 - which switches back to $config['interfaces']['wan']['gateway'] and then later config conversions do their thing with that.
I guess this will only effect people who upgrade from some really old config (or monowall?)
2015-03-02 07:39:26 -03:00
Renato Botelho
59f64414ab Fix track6 prefix id range in error message, reported on Pull Request #1517 2015-02-26 10:34:13 -03:00
jim-p
5b06d6ad44 Fix type (trime->trim) 2015-02-26 08:26:56 -05:00
k-paulius
e607009a49 Check if variables are set before trying to pass them to function substr_count to avoid generating PHP alerts. 2015-02-26 09:31:47 -03:00
Phil Davis
2798bb681f interface_netgraph_needed can miss setting found equals true
This routine seems to go looking to see if the passed-in interface is PPP-style. At the end, if it is not PPP-style then it calls pfsense_ngctl_detach.
This foreach loop in its current state will always exit after the first iteration that is not mode "server". But it looks like it should look through all the 'pppoe' entries until it finds the interface or gets to the end.
In theory the code will sometimes miss setting $found = true when it should have. And thus pfsense_ngctl_detach would get called later for a PPP-style interface.
I noticed this while reviewing for code style guide - it is an example where the indenting shows the intention but there are no curlies to implement it.
2015-02-26 09:28:25 -03:00
Chris Buechler
8cf108b224 remove unused legacy code 2015-02-26 01:35:15 -06:00
Chris Buechler
71a690bba0 Log ifconfig commands used to setup wireless interfaces 2015-02-26 01:32:42 -06:00
Ermal LUÇI
59eb0ce73a Put the bits to use the new reset utility 2015-02-25 21:27:11 +01:00
Ermal LUÇI
4c9b272d11 Ticket #4418 Actually make each entry a clear token to strongswan parser for dns_split 2015-02-25 16:22:17 +01:00
Ermal LUÇI
ca5f5db156 Ticket #4418 make sure the dns_split is separated with spaces rather than space or comma to comply with strongswan requirements. 2015-02-25 16:19:41 +01:00
Ermal LUÇI
82e6fde290 Ticket #4418 Make the DNS names attr 28675 space separated as identified by Jeffrey Dvornek 2015-02-25 16:16:02 +01:00
Chris Buechler
e082eca9d9 remove old, unused code 2015-02-25 00:25:51 -06:00
Renato Botelho
aa314146ca When RADIUS auth is selected, radius protocol and server ip/host are mandatory. Fixes #4384 2015-02-24 16:08:29 -03:00
Renato Botelho
6c452c3ebe Initialize var and move unset outside the loop 2015-02-24 15:45:26 -03:00
k-paulius
83fa2c736a Do not request prefix delegation if no tracking interfaces are setup to
use it. Ticket #4436
2015-02-24 15:45:23 -03:00
Renato Botelho
3adf6f272f isset is a better check here 2015-02-24 15:40:55 -03:00
k-paulius
2e50e5b1fc Fixing issues with NTP RRD graph state changes
- only call enable_rrd_graphing() after $config['ntpd']['statsgraph']
   is set
 - fix if condition; empty and isset are each other's opposites
2015-02-24 15:40:51 -03:00
PiBa-NL
b5ecfe0f35 carp, don't show status icon from previous carp ip in case the ip is not present on the interface (test with ifconfig em0 1.2.3.4 delete) 2015-02-24 08:40:35 -03:00
Phil Davis
42fcce27d8 Handle reverse lookup domain overrides
that match exactly a whole block of private address space.
e.g. if the user has checked "Do not forward private reverse lookups" and also adds adds a domain override that matches a whole block of private address space, such as:
10.in-addr.arpa -> 10.42.1.1
then we want all reverse lookups in the "10" network to be referred to their DNS server at 10.42.1.1 and reverse lookups of other private addresses to immediately return NXDOMAIN.
Without this change, those referrals were not happening, because there was a "-server=10.in-addr.arpa" to nowhere put on the command line and that was effectively overriding the user-specified domain override!
2015-02-24 08:24:57 -03:00
Lorenz Schori
f31436cc55 Fix PTR records for aliases in host overrides 2015-02-24 08:08:31 -03:00
Ermal LUÇI
361027c7f5 Ticket #4445 do not write config and remove its cache when applying settings its just behaviour from dinosaur era and should have been cleanded long time ago. 2015-02-23 21:20:41 +01:00
Phil Davis
623e6d096d Preserve "add routers" value across loop for each interface
Forum: https://forum.pfsense.org/index.php?topic=89302.0

If the user put "none" in the 'gateway' field for the DHCP settings of an interface, that would set $add_routers to false at line 742. Coming around the loop again for a subsequent interface, and going through the else line 744, nothing would set $add_routers back to true (actually back to the value originally calculated at line 461).
Use a different var to remember the boolean value calculated at line 461 so it can be remembered and used as needed each time through the loop.

I set Gateway "none" on my LAN and left it blank on OPT1 and came up with the same problem as the forum post - OPT1 got no " option routers" statement in dhcpd.conf

After this code fix it looks good.
2015-02-23 16:28:15 -03:00
Phil Davis
4f5967b9a8 diag_arp allow underscore in resolved host names
is_hostname() and is_domain() allow underscore in the names. So it is possible to have underscore in host names, for example in DHCP server static mapped entries I have some things like:
10.42.3.4 client-pc-01_LAN
10.42.3.5 client-pc-01_WIFI
These reverse-resolve fine - 10.42.3.4 becomes client-pc-01_LAN
But the preg_match here misses such names that have an underscore in them.
I noticed this when looking into forum post: https://forum.pfsense.org/index.php?topic=88956.0
2015-02-23 16:18:05 -03:00
Daniel Becker
ce0e5d384d fix Net_IPv6::compress() to properly handle all-zeros address
The existing implementation of Net_IPv6::compress produces an empty
string when compressing the all-zeros ("::") address; fix this by
checking for empty return values and replacing them with "::".
2015-02-23 16:05:40 -03:00
Daniel Becker
07efe7c0eb add dhcp6.name-servers option with DHCPD-PD regardless of PD length
The existing code only includes a v6 name server IP in the
automatically generated dhcpdv6 configuration for tracking interfaces if
there are additional prefixes that can be delegated on to the next
router (i.e., if PD length > 2). The correct behavior is for this option
to be included regardless of the PD length, as implemented in this
change.
2015-02-23 15:02:40 -03:00
Daniel Becker
76feb40735 make computation of start of DHCPv6 range consistent with actual check
When computing the start IP for the 'available range' field,
services_dhcpv6.php attempts to increment a colon-formatted v6 address.
Since this always fails, so the value that's printed is not actually
incremented, so remove the bogus addition.

Note that this is actually matches the behavior of the range checks that
services_dhcpv6.php performs: The actual check uses the range
[gen_subnetv6()..gen_subnetv6_max()], which does include the first
(= all-zeroes host part) v6 address in the prefix.
2015-02-23 14:38:30 -03:00
Lorenz Schori
a0e4410f08 Do not add PTR records for aliases in host overrides 2015-02-23 14:31:01 -03:00
Phil Davis
ff7990df20 Fix display style typo
I could not see any difference in rendering of the page after fixing this, but it looks it it should be fixed.
2015-02-23 14:18:15 -03:00
Phil Davis
41de7158bd Fix display style typo
I could not see any difference in rendering of the page after fixing this, but it looks it it should be fixed.
2015-02-23 14:18:08 -03:00
Phil Davis
ba7d3bd3f9 OpenVPN server improve handling of authmode
Currently if the user is clicking around while they are setting up an OpenVPN server, they can do stuff like this:
a) Select Server Mode - Remote Access (SSL/TLS + User Auth)
b) Select something in Backend for authentication
c) Change their mind and select Server Mode - Peer to Peer (SSL/TLS)
d) Enter the other settings and Save
Now the OpenVPN server config has an 'authmode' key in it.
Probably does no harm, I suspect it will simply not be used when building the server.conf for Peer to Peer, but it looks a bit odd when analysing/diagnosing a config for problems.
Other fields that are mode-specific have tests to only save the values at the end if the appropriate mode is the one finally selected.

While I am here, I also constantly forget to click on "Local Database" authmode when setting up a new server. It gives the validation error message, then I click on "Local Database" again and save. Seems unnecessary - when defining a new OpenVPN server why not default this to have the first entry in the list be the one selected? So I did that. What do you think? 1 place less for many users to need to click.
2015-02-23 14:18:03 -03:00
Phil Davis
683eb99247 vpn_openvpn_server.php white space 2015-02-23 14:17:58 -03:00
Phil Davis
d2ffc02fed Mention interface name on DHCP edit GUI
IMHO it can be confusing on the DHCP edit page for static mapped entries to know which interface the entry is being edited/added for. Specially if the user comes from the Status DHCP Leases page, the lease they are editing/adding could be for 1 of many LAN-style interfaces.
This also made it easier for me to see which interface entry I was editing when I was testing https://github.com/pfsense/pfsense/pull/1504
2015-02-23 09:30:45 -03:00
Phil Davis
aeb5bf8e93 Status_dhcp_leases fix edit button for static entries with no IP address
The edit button for static entries always has an index id=0 and thus pressing the edit button goes to (mostly) edit the wrong entry.
It was easier and made the code cleaner to get rid of the looping through the staticmap array every time trying to matach IP, MAC address... That data ('if' and 'staticmap_array_index') is easily gathered further up, the first time the staticmap array for each DHCP interface is traversed. I think this should also be more efficient when there are many static mapping entries.
Forum: https://forum.pfsense.org/index.php?topic=89072.msg493241#msg493241
2015-02-23 09:29:53 -03:00
k-paulius
8261c0b6ac Fix broken links to dhcp6c.conf man page.
manpath FreeBSD+Ports no longer exits and needs to be replaced with FreeBSD+10.1-RELEASE+and+Ports
2015-02-23 09:23:37 -03:00
Phil Davis
c0fde4e403 Success typo
might as well fix it while I notice it
2015-02-23 09:18:55 -03:00
johnbyronent
7b6d4e6c95 Modified DynDns -> Eurodns url 2015-02-23 09:17:34 -03:00
jim-p
ec9bd3fa20 Clean up some old, possibly stale, files when restarting php-fpm 2015-02-20 13:42:23 -05:00
Chris Buechler
a9386b8f5b add a couple unnecessary bsdinstaller files to obsoletedfiles 2015-02-18 19:53:28 -06:00
Chris Buechler
07dee7aae0 remove unused dfuife files. 2015-02-18 19:44:50 -06:00
Chris Buechler
90d1d8cf88 Don't hard code harden-referral-path. It defaults to no, so no behavior change, and that setting is unlikely to ever become a default. This allows users to configure an override to enable this option if desired. part of Ticket #4399 2015-02-18 01:58:22 -06:00
Chris Buechler
7b404fdec0 Add GUI control for MOBIKE. Hide it when IKEv1 selected. Enable toggling of NAT-T field display so it's on for IKEv1, off for IKEv2. Do same for reauth while here. Ticket #3979 2015-02-18 00:39:26 -06:00
Chris Buechler
cfda8861b9 Wait a bit after sending a TERM to syslogd as in some instances it can take too long to stop, and it fails to restart because it's still running at that point. Add a KILL in case it's still running after that. Ticket #4393 2015-02-17 22:32:14 -06:00
Renato Botelho
cc94ea5019 Unobsolete libpcre.so.1 2015-02-13 18:28:38 -02:00
BBcan177
3ddc5d1af0 Update fbegin.inc - Missing '/' in path
Found this issue in conjunction with user Digdug3
2015-02-13 16:24:24 -02:00
Ermal LUÇI
fc06d8ea55 Surrond the some mobile clients attributes with " ( quote ) to help the strongswan parser identify properly the values. Ticket #4418 2015-02-13 12:32:02 +01:00
Chris Buechler
e2d0aee863 force minimum 100000 byte log file size. Some have been confused thinking this is KB, in some cases causing problems. This should help, and there shouldn't be a need for logs smaller than that. 2015-02-13 00:19:15 -06:00