summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-01 21:57:20 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-01 21:57:20 +0000
commit243aa7b95cc15352dbc7b8f87a7c77e8c135c897 (patch)
tree5bca69a66897855f5561594d59a51eaddca15675
parentab72b53b9be62fd723a9ed921a326bd02c9dcc3a (diff)
downloadpfsense-243aa7b95cc15352dbc7b8f87a7c77e8c135c897.zip
pfsense-243aa7b95cc15352dbc7b8f87a7c77e8c135c897.tar.gz
Add patches from databeestje which:
This will supress ARP messages when interfaces share the same physical network
-rw-r--r--etc/inc/system.inc14
-rwxr-xr-xusr/local/www/system_advanced.php31
2 files changed, 45 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 58e3794..6b14f16 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -619,11 +619,25 @@ function system_set_harddisk_standby() {
}
function system_setup_sysctl() {
+ global $config;
+
$sysctl = return_filename_as_array("/etc/sysctl.conf");
foreach($sysctl as $sysc) {
if($sysc <> "")
mwexec("sysctl {$sysc}");
}
+ if (isset($config['system']['sharednet'])) {
+ system_disable_arp_wrong_if();
+ }
+}
+
+function system_disable_arp_wrong_if() {
+ mwexec("/sbin/sysctl -n net.link.ether.inet.log_arp_wrong_iface=0");
}
+function system_enable_arp_wrong_if() {
+ mwexec("/sbin/sysctl -n net.link.ether.inet.log_arp_wrong_iface=1");
+}
+
+
?>
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php
index 315992e..cc555f7 100755
--- a/usr/local/www/system_advanced.php
+++ b/usr/local/www/system_advanced.php
@@ -53,6 +53,7 @@ $pconfig['enableserial'] = $config['system']['enableserial'];
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
$pconfig['enablesshd'] = $config['system']['enablesshd'];
+$pconfig['sharednet'] = $config['system']['sharednet'];
if ($_POST) {
@@ -101,6 +102,15 @@ if ($_POST) {
} else {
unset($config['system']['enablesshd']);
}
+
+ if($_POST['sharednet'] == "yes") {
+ $config['system']['sharednet'] = true;
+ system_disable_arp_wrong_if();
+ } else {
+ unset($config['system']['sharednet']);
+ system_enable_arp_wrong_if();
+ }
+
if($_POST['disableftpproxy'] == "yes") {
$config['system']['disableftpproxy'] = "enabled";
unset($config['system']['rfc959workaround']);
@@ -317,6 +327,27 @@ function openwindow(url) {
</tr>
<tr>
+ <td colspan="2" valign="top" class="listtopic">Shared Physical Network</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">&nbsp;</td>
+ <td width="78%" class="vtable">
+ <input name="sharednet" type="checkbox" id="sharednet" value="yes" <?php if (isset($pconfig['sharednet'])) echo "checked"; ?> onclick="enable_change(false)">
+ <strong>This will supress ARP messages when interfaces share the same physical network</strong>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ </td>
+ </tr>
+ </tr>
+ <tr>
+ <td colspan="2" class="list" height="12"></td>
+ </tr>
+
+ <tr>
<td colspan="2" valign="top" class="listtopic">Theme</td>
</tr>
<tr>
OpenPOWER on IntegriCloud