summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-07-12 19:57:42 -0400
committerjim-p <jimp@pfsense.org>2011-07-12 19:57:42 -0400
commit8b6313a4d3eb1895b6c855436a50606cc7691ad4 (patch)
tree97784c2235366f00f42961dd4557e82fadf1ce8c /usr
parent13b9dba9aae25edf62d6cd58c7446329b0dd913c (diff)
parentfd3e19f3bf9499b944263c0acaeaa6446260f197 (diff)
downloadpfsense-8b6313a4d3eb1895b6c855436a50606cc7691ad4.zip
pfsense-8b6313a4d3eb1895b6c855436a50606cc7691ad4.tar.gz
Merge remote-tracking branch 'upstream/master'
Conflicts: etc/inc/easyrule.inc etc/inc/filter.inc etc/inc/interfaces.inc etc/inc/services.inc etc/inc/xmlrpc_client.inc usr/local/www/fbegin.inc usr/local/www/services_dhcp.php
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ppp-linkdown8
-rwxr-xr-xusr/local/sbin/vpn-linkdown2
-rwxr-xr-xusr/local/www/fbegin.inc201
-rwxr-xr-xusr/local/www/firewall_rules_edit.php20
-rwxr-xr-xusr/local/www/guiconfig.inc4
-rwxr-xr-xusr/local/www/services_dhcp.php6
-rwxr-xr-xusr/local/www/services_dhcp_relay.php2
-rwxr-xr-xusr/local/www/services_dnsmasq.php12
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php2
9 files changed, 148 insertions, 109 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index a20d966..4c1ad15 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -6,10 +6,10 @@ fi
if [ -f "/tmp/${interface}_defaultgw" ]; then
route delete default $4
fi
-/sbin/pfctl -k 0.0.0.0/0 -k $3
-/sbin/pfctl -k $3
-pfctl -K $3
-/sbin/pfctl -b 0.0.0.0/32 -b $4
+/sbin/pfctl -k 0.0.0.0/0 -k $3/32
+/sbin/pfctl -k $3/32
+pfctl -K $3/32
+/sbin/pfctl -b 0.0.0.0/32 -b $4/32
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown $1:
if [ -f "/var/etc/nameserver_$1" ]; then
diff --git a/usr/local/sbin/vpn-linkdown b/usr/local/sbin/vpn-linkdown
index 1d533cb..ac9ea2a 100755
--- a/usr/local/sbin/vpn-linkdown
+++ b/usr/local/sbin/vpn-linkdown
@@ -2,4 +2,4 @@
# record logout
/usr/bin/logger -p local3.info "logout,$1,$4,$5"
-# /sbin/pfctl -b $3 -b $4
+/sbin/pfctl -b $3/32 -b $4/32
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index a35e897..1da31be 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -80,19 +80,19 @@ function output_menu($arrayitem, $target="") {
// System
$system_menu = array();
-$system_menu[] = array("Advanced", "/system_advanced_admin.php");
-$system_menu[] = array("Firmware", "/system_firmware.php");
-$system_menu[] = array("General Setup", "/system.php");
-$system_menu[] = array("Logout", "/index.php?logout");
+$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
+$system_menu[] = array(gettext("Firmware"), "/system_firmware.php");
+$system_menu[] = array(gettext("General Setup"), "/system.php");
+$system_menu[] = array(gettext("Logout"), "/index.php?logout");
if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
- $system_menu[] = array("Packages", "/pkg_mgr_installed.php");
-$system_menu[] = array("Setup Wizard", "/wizard.php?xml=setup_wizard.xml");
-$system_menu[] = array("Routing", "/system_gateways.php");
-$system_menu[] = array("Cert Manager", "/system_camanager.php");
+ $system_menu[] = array(gettext("Packages"), "/pkg_mgr_installed.php");
+$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml");
+$system_menu[] = array(gettext("Routing"), "/system_gateways.php");
+$system_menu[] = array(gettext("Cert Manager"), "/system_camanager.php");
if (!isAllowedPage("system_usermanager.php*"))
- $system_menu[] = array("User Manager", "/system_usermanager_passwordmg.php");
+ $system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php");
else
- $system_menu[] = array("User Manager", "/system_usermanager.php");
+ $system_menu[] = array(gettext("User Manager"), "/system_usermanager.php");
$system_menu = msort(array_merge($system_menu, return_ext_menu("System")),0);
// Interfaces
@@ -107,70 +107,71 @@ $interfaces_menu = msort(array_merge($interfaces_menu, return_ext_menu("Interfac
// Firewall
$firewall_menu = array();
-$firewall_menu[] = array("Aliases", "/firewall_aliases.php");
-$firewall_menu[] = array("NAT", "/firewall_nat.php");
-$firewall_menu[] = array("Rules", "/firewall_rules.php");
-$firewall_menu[] = array("Schedules", "/firewall_schedule.php");
-$firewall_menu[] = array("Traffic Shaper", "/firewall_shaper.php");
-$firewall_menu[] = array("Virtual IPs", "/firewall_virtual_ip.php");
+$firewall_menu[] = array(gettext("Aliases"), "/firewall_aliases.php");
+$firewall_menu[] = array(gettext("NAT"), "/firewall_nat.php");
+$firewall_menu[] = array(gettext("Rules"), "/firewall_rules.php");
+$firewall_menu[] = array(gettext("Schedules"), "/firewall_schedule.php");
+$firewall_menu[] = array(gettext("Traffic Shaper"), "/firewall_shaper.php");
+$firewall_menu[] = array(gettext("Virtual IPs"), "/firewall_virtual_ip.php");
$firewall_menu = msort(array_merge($firewall_menu, return_ext_menu("Firewall")),0);
// Services
$services_menu = array();
-$services_menu[] = array("Captive Portal", "/services_captiveportal.php");
-$services_menu[] = array("DNS Forwarder", "/services_dnsmasq.php");
-$services_menu[] = array("DHCP Relay", "/services_dhcp_relay.php");
-if($g['services_dhcp_server_enable'])
- $services_menu[] = array("DHCP Server", "/services_dhcp.php");
- $services_menu[] = array("DHCPv6 Server", "/services_dhcpv6.php");
-$services_menu[] = array("Dynamic DNS", "/services_dyndns.php");
-$services_menu[] = array("IGMP proxy", "/services_igmpproxy.php");
-$services_menu[] = array("Load Balancer", "/load_balancer_pool.php");
-$services_menu[] = array("OLSR", "/pkg_edit.php?xml=olsrd.xml&id=0");
-$services_menu[] = array("PPPoE Server", "/vpn_pppoe.php");
-$services_menu[] = array("RIP", "/pkg_edit.php?xml=routed.xml&id=0");
-$services_menu[] = array("SNMP", "/services_snmp.php");
+$services_menu[] = array(gettext("Captive Portal"), "/services_captiveportal.php");
+$services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php");
+$services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php");
+if($g['services_dhcp_server_enable']) {
+ $services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php");
+ $services_menu[] = array(gettext("DHCPv6 Server"), "/services_dhcpv6.php");
+}
+$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
+$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
+$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
+$services_menu[] = array(gettext("OLSR"), "/pkg_edit.php?xml=olsrd.xml&id=0");
+$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php");
+$services_menu[] = array(gettext("RIP"), "/pkg_edit.php?xml=routed.xml&id=0");
+$services_menu[] = array(gettext("SNMP"), "/services_snmp.php");
if(count($config['interfaces']) > 1) {
/* no use for UPnP in single-interface deployments
remove to reduce user confusion
*/
- $services_menu[] = array("UPnP &amp; NAT-PMP", "/pkg_edit.php?xml=miniupnpd.xml&id=0");
+ $services_menu[] = array(gettext("UPnP &amp; NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml&id=0");
}
-$services_menu[] = array("OpenNTPD", "/pkg_edit.php?xml=openntpd.xml&id=0");
-$services_menu[] = array("Wake on LAN", "/services_wol.php");
+$services_menu[] = array(gettext("OpenNTPD"), "/pkg_edit.php?xml=openntpd.xml&id=0");
+$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php");
$services_menu = msort(array_merge($services_menu, return_ext_menu("Services")),0);
// VPN
$vpn_menu = array();
-$vpn_menu[] = array("IPsec", "/vpn_ipsec.php");
-$vpn_menu[] = array("OpenVPN", "/vpn_openvpn_server.php");
-$vpn_menu[] = array("PPTP", "/vpn_pptp.php");
-$vpn_menu[] = array("L2TP", "/vpn_l2tp.php");
+$vpn_menu[] = array(gettext("IPsec"), "/vpn_ipsec.php");
+$vpn_menu[] = array(gettext("OpenVPN"), "/vpn_openvpn_server.php");
+$vpn_menu[] = array(gettext("PPTP"), "/vpn_pptp.php");
+$vpn_menu[] = array(gettext("L2TP"), "/vpn_l2tp.php");
$vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")),0);
// Status
$status_menu = array();
if (isset($config['captiveportal']['enable']))
- $status_menu[] = array("Captive Portal", "/status_captiveportal.php");
-$status_menu[] = array("CARP (failover)", "/carp_status.php");
-$status_menu[] = array("Dashboard", "/index.php");
-$status_menu[] = array("Gateways", "/status_gateways.php");
-$status_menu[] = array("DHCP Leases", "/status_dhcp_leases.php");
-$status_menu[] = array("DHCPv6 Leases", "/status_dhcpv6_leases.php");
-$status_menu[] = array("Filter Reload", "/status_filter_reload.php");
-$status_menu[] = array("Interfaces", "/status_interfaces.php");
-$status_menu[] = array("IPsec", "/diag_ipsec.php");
-$status_menu[] = array("Load Balancer", "/status_lb_pool.php");
-$status_menu[] = array("OpenVPN", "/status_openvpn.php");
+ $status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php");
+$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php");
+$status_menu[] = array(gettext("Dashboard"), "/index.php");
+$status_menu[] = array(gettext("Gateways"), "/status_gateways.php");
+$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php");
+$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php");
+$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php");
+$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php");
+$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php");
+$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php");
+$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php");
if ($g['platform'] == "pfSense")
- $status_menu[] = array("Package Logs", "/diag_pkglogs.php");
-$status_menu[] = array("Queues", "/status_queues.php");
-$status_menu[] = array("RRD Graphs", "/status_rrd_graph.php");
-$status_menu[] = array("Services", "/status_services.php");
-$status_menu[] = array("System Logs", "/diag_logs.php");
-$status_menu[] = array("Traffic Graph", "/status_graph.php?if=wan");
+ $status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php");
+$status_menu[] = array(gettext("Queues"), "/status_queues.php");
+$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php");
+$status_menu[] = array(gettext("Services"), "/status_services.php");
+$status_menu[] = array(gettext("System Logs"), "/diag_logs.php");
+$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan");
if(count($config['interfaces']) > 1)
- $status_menu[] = array("UPnP &amp; NAT-PMP", "/status_upnp.php");
+ $status_menu[] = array(gettext("UPnP &amp; NAT-PMP"), "/status_upnp.php");
$ifentries = get_configured_interface_with_descr();
foreach ($ifentries as $ent => $entdesc) {
if (is_array($config['interfaces'][$ent]['wireless']) &&
@@ -178,55 +179,55 @@ foreach ($ifentries as $ent => $entdesc) {
$wifdescrs[$ent] = $entdesc;
}
if (count($wifdescrs) > 0)
- $status_menu[] = array("Wireless", "/status_wireless.php");
+ $status_menu[] = array(gettext("Wireless"), "/status_wireless.php");
$status_menu = msort(array_merge($status_menu, return_ext_menu("Status")),0);
// Diagnostics
$diagnostics_menu = array();
-$diagnostics_menu[] = array("ARP Tables", "/diag_arp.php");
-$diagnostics_menu[] = array("Authentication", "/diag_authentication.php");
-$diagnostics_menu[] = array("Backup/Restore", "/diag_backup.php");
-$diagnostics_menu[] = array("Command Prompt", "/exec.php");
-$diagnostics_menu[] = array("DNS Lookup", "/diag_dns.php");
-$diagnostics_menu[] = array("Edit File", "/edit.php");
-$diagnostics_menu[] = array("Factory Defaults", "/diag_defaults.php");
-$diagnostics_menu[] = array("Halt System", "/halt.php" );
-$diagnostics_menu[] = array("Limiter Info", "/diag_limiter_info.php" );
-$diagnostics_menu[] = array("NDP Table", "/diag_ndp.php" );
-
-$diagnostics_menu[] = array("Tables", "/diag_tables.php");
-$diagnostics_menu[] = array("Ping", "/diag_ping.php");
-$diagnostics_menu[] = array("pfInfo", "/diag_pf_info.php");
-$diagnostics_menu[] = array("pfTop", "/diag_system_pftop.php");
-$diagnostics_menu[] = array("Reboot", "/reboot.php");
-$diagnostics_menu[] = array("Routes", "/diag_routes.php");
-$diagnostics_menu[] = array("SMART Status", "/diag_smart.php");
-$diagnostics_menu[] = array("States", "/diag_dump_states.php");
-$diagnostics_menu[] = array("States Summary", "/diag_states_summary.php");
-$diagnostics_menu[] = array("System Activity", "/diag_system_activity.php");
-$diagnostics_menu[] = array("Traceroute", "/diag_traceroute.php");
-$diagnostics_menu[] = array("Packet Capture", "/diag_packet_capture.php");
+$diagnostics_menu[] = array(gettext("ARP Tables"), "/diag_arp.php");
+$diagnostics_menu[] = array(gettext("Authentication"), "/diag_authentication.php");
+$diagnostics_menu[] = array(gettext("Backup/Restore"), "/diag_backup.php");
+$diagnostics_menu[] = array(gettext("Command Prompt"), "/exec.php");
+$diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php");
+$diagnostics_menu[] = array(gettext("Edit File"), "/edit.php");
+$diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php");
+$diagnostics_menu[] = array(gettext("Halt System"), "/halt.php" );
+$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php" );
+$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php" );
+
+$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php");
+$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php");
+$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php");
+$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php");
+$diagnostics_menu[] = array(gettext("Reboot"), "/reboot.php");
+$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php");
+$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php");
+$diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php");
+$diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php");
+$diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php");
+$diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php");
+$diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php");
if($g['platform'] == "nanobsd")
- $diagnostics_menu[] = array("NanoBSD", "/diag_nanobsd.php");
+ $diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php");
if (isset($config['system']['developer'])) {
echo "<li><hr width=\"80%\"/></li>";
- $diagnostics_menu[] = array("Restart HTTPD", "/restart_httpd.php");
+ $diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php");
}
$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")),0);
if(! $g['disablehelpmenu']) {
$help_menu = array();
- $help_menu[] = array("About this Page", $helpurl);
+ $help_menu[] = array(gettext("About this Page"), $helpurl);
if($g['product_name'] == "pfSense")
- $help_menu[] = array("Bug Database", "http://www.pfsense.org/j.php?jumpto=redmine");
- $help_menu[] = array("User Forum", "http://www.pfsense.org/j.php?jumpto=forum");
- $help_menu[] = array("Documentation", "http://www.pfsense.org/j.php?jumpto=doc");
- $help_menu[] = array("Developers Wiki", "http://www.pfsense.org/j.php?jumpto=devwiki");
- $help_menu[] = array("Paid Support", "http://www.pfsense.org/j.php?jumpto=portal");
- $help_menu[] = array("pfSense Book", "http://www.pfsense.org/j.php?jumpto=book");
- $help_menu[] = array("Search portal", "http://www.pfsense.org/j.php?jumpto=searchportal");
- $help_menu[] = array("FreeBSD Handbook", "http://www.pfsense.org/j.php?jumpto=fbsdhandbook");
+ $help_menu[] = array(gettext("Bug Database"), "http://www.pfsense.org/j.php?jumpto=redmine");
+ $help_menu[] = array(gettext("User Forum"), "http://www.pfsense.org/j.php?jumpto=forum");
+ $help_menu[] = array(gettext("Documentation"), "http://www.pfsense.org/j.php?jumpto=doc");
+ $help_menu[] = array(gettext("Developers Wiki"), "http://www.pfsense.org/j.php?jumpto=devwiki");
+ $help_menu[] = array(gettext("Paid Support"), "http://www.pfsense.org/j.php?jumpto=portal");
+ $help_menu[] = array(gettext("pfSense Book"), "http://www.pfsense.org/j.php?jumpto=book");
+ $help_menu[] = array(gettext("Search portal"), "http://www.pfsense.org/j.php?jumpto=searchportal");
+ $help_menu[] = array(gettext("FreeBSD Handbook"), "http://www.pfsense.org/j.php?jumpto=fbsdhandbook");
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")),0);
}
@@ -314,7 +315,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
<div id="navigation" style="z-index:1000">
<ul id="menu">
<li class="firstdrop">
- <div>System</div>
+ <div><?php echo gettext("System"); ?></div>
<ul class="subdrop">
<?php
output_menu($system_menu);
@@ -322,7 +323,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>Interfaces</div>
+ <div><?php echo gettext("Interfaces"); ?></div>
<ul class="subdrop">
<?php
output_menu($interfaces_menu);
@@ -330,7 +331,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>Firewall</div>
+ <div><?php echo gettext("Firewall"); ?></div>
<ul class="subdrop">
<?php
output_menu($firewall_menu);
@@ -338,7 +339,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>Services</div>
+ <div><?php echo gettext("Services"); ?></div>
<ul class="subdrop">
<?
output_menu($services_menu);
@@ -346,7 +347,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>VPN</div>
+ <div><?php echo gettext("VPN"); ?></div>
<ul class="subdrop">
<?php
output_menu($vpn_menu);
@@ -354,7 +355,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>Status</div>
+ <div><?php echo gettext("Status"); ?></div>
<ul class="subdrop">
<?php
output_menu($status_menu);
@@ -362,7 +363,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</ul>
</li>
<li class="drop">
- <div>Diagnostics</div>
+ <div><?php echo gettext("Diagnostics"); ?></div>
<ul id="diag" class="subdrop">
<?
output_menu($diagnostics_menu);
@@ -371,7 +372,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
</li>
<?php if(! $g['disablehelpmenu']): ?>
<li class="lastdrop">
- <div>Help</div>
+ <div><?php echo gettext("Help"); ?></div>
<ul id="help" class="subdrop">
<?
output_menu($help_menu, "_new");
@@ -420,13 +421,13 @@ function add_to_menu($url, $name) {
<span class="pgtitle"><a href="<?= $_SERVER['SCRIPT_NAME'] ?>"><?=genhtmltitle($pgtitle);?></a></span>
<span style="float:right; margin: 0 0 20px 20px;">
<?php if(! empty($statusurl)): ?>
-<a href="<?php echo $statusurl; ?>" target="_new" title="Status of items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a>
+<a href="<?php echo $statusurl; ?>" target="_new" title="<?php echo gettext("Status of items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a>
<?php endif; ?>
<?php if(! empty($logurl)): ?>
-<a href="<?php echo $logurl; ?>" target="_new" title="Log entries for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a>
+<a href="<?php echo $logurl; ?>" target="_new" title="<?php echo gettext("Log entries for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a>
<?php endif; ?>
<?php if(! $g['disablehelpicon']): ?>
-<a href="<?php echo $helpurl; ?>" target="_new" title="Help for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a>
+<a href="<?php echo $helpurl; ?>" target="_new" title="<?php echo gettext("Help for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a>
<?php endif; ?>
</span>
</div>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index e935e15..6591ad1 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -305,6 +305,26 @@ if ($_POST) {
$input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstendport']);
+ if ( !$_POST['srcbeginport_cust'] && $_POST['srcendport_cust'])
+ if (is_alias($_POST['srcendport_cust']))
+ $input_errors[] = 'If you put port alias in Source port range to: field you must put the same port alias in from: field';
+ if ( $_POST['srcbeginport_cust'] && $_POST['srcendport_cust']){
+ if (is_alias($_POST['srcendport_cust']) && is_alias($_POST['srcendport_cust']) && $_POST['srcbeginport_cust'] != $_POST['srcendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Source port range from: and to: fields';
+ if ((is_alias($_POST['srcbeginport_cust']) && (!is_alias($_POST['srcendport_cust']) && $_POST['srcendport_cust']!='')) ||
+ ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust']!='') && is_alias($_POST['srcendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Source port range from: and to: field';
+ }
+ if ( !$_POST['dstbeginport_cust'] && $_POST['dstendport_cust'])
+ if (is_alias($_POST['dstendport_cust']))
+ $input_errors[] = 'If you put port alias in Destination port range to: field you must put the same port alias in from: field';
+ if ( $_POST['dstbeginport_cust'] && $_POST['dstendport_cust']){
+ if (is_alias($_POST['dstendport_cust']) && is_alias($_POST['dstendport_cust']) && $_POST['dstbeginport_cust'] != $_POST['dstendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Destination port range from: and to: fields';
+ if ((is_alias($_POST['dstbeginport_cust']) && (!is_alias($_POST['dstendport_cust']) && $_POST['dstendport_cust']!='')) ||
+ ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust']!='') && is_alias($_POST['dstendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Destination port range from: and to: field';
+ }
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 940eb34..63fadab 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -292,7 +292,7 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") {
if($nifty_background == "")
$nifty_background = "#FFF";
- if(stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) {
+ if(stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false) {
$savebutton = "<td class='infoboxsave'>";
$savebutton .= "<input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">";
if($_POST['if'])
@@ -1092,4 +1092,4 @@ function rule_popup($src,$srcport,$dst,$dstport){
}
}
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index ea5af18..122912d 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -216,6 +216,12 @@ if ($_POST) {
$input_errors[] = gettext("A valid IP address must be specified for the gateway.");
if (($_POST['wins1'] && !is_ipaddrv4($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddrv4($_POST['wins2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
+ $parent_ip = get_interface_ip($_POST['if']);
+ if (is_ipaddrv4($parent_ip) && $_POST['gateway']) {
+ $parent_sn = get_interface_subnet($_POST['if']);
+ if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway']))
+ $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']);
+ }
if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index 37a9837..d0f1108 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -180,7 +180,7 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="server" type="text" class="formfld unknown" id="server" size="20" value="<?=htmlspecialchars($pconfig['server']);?>">
<br>
- <?=gettext("This is the IP address of the server to which the DHCP packet is relayed. You can enter multiple ip address server entries separated by commas. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
+ <?=gettext("This is the IP address of the server to which DHCP requests are relayed. You can enter multiple server IP addresses, separated by commas. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
</td>
</tr>
<tr>
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index defb275..a58e6f8 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -47,6 +47,7 @@ require_once("shaper.inc");
$pconfig['enable'] = isset($config['dnsmasq']['enable']);
$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']);
$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']);
+$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']);
if (!is_array($config['dnsmasq']['hosts']))
$config['dnsmasq']['hosts'] = array();
@@ -65,6 +66,7 @@ if ($_POST) {
$config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
$config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
$config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
+ $config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
write_config();
@@ -112,6 +114,7 @@ function enable_change(enable_over) {
endis = !(document.iform.enable.checked || enable_over);
document.iform.regdhcp.disabled = endis;
document.iform.regdhcpstatic.disabled = endis;
+ document.iform.dhcpfirst.disabled = endis;
}
//-->
</script>
@@ -152,6 +155,15 @@ function enable_change(enable_over) {
</td>
</tr>
<tr>
+ <td class="vtable"><p>
+ <input name="dhcpfirst" type="checkbox" id="dhcpfirst" value="yes" <?php if ($pconfig['dhcpfirst'] == "yes") echo "checked";?>>
+ <strong><?=gettext("Resolve DHCP mappings first");?><br>
+ </strong><?php printf(gettext("If this option is set, then DHCP mappings will ".
+ "be resolved before the manual list of names below. This only ".
+ "affects the name given for a reverse lookup (PTR)."));?></p>
+ </td>
+ </tr>
+ <tr>
<td>
<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
</td>
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 5917844..83d1d62 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -615,7 +615,7 @@ function dpdchkbox_change() {
<td width="78%" class="vtable">
<select name="mode" class="formselect">
<?php
- $modes = array(gettext("main"),gettext("aggressive"));
+ $modes = array("main","aggressive");
foreach ($modes as $mode):
?>
<option value="<?=$mode;?>" <?php if ($mode == $pconfig['mode']) echo "selected"; ?>>
OpenPOWER on IntegriCloud