Skip to content

Commit

Permalink
FRR add maxsockbuf tunable by default during install
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhughes committed Jan 1, 2021
1 parent dadaef1 commit 69cb2af
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions net/pfSense-pkg-frr/files/usr/local/pkg/frr.inc
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ function frr_package_config_upgrade() {
$need_write = true;
}
}
update_status("Done.\n");

/* Save Changes */
if ($need_write) {
Expand All @@ -983,8 +984,28 @@ function frr_package_config_upgrade() {
}
}

function frr_set_tunables() {
global $config;

init_config_arr(array('sysctl', 'item'));
$sysctl_conf = &$config['sysctl']['item'];
$sysctl_maxsockbuff = array('tunable' => 'kern.ipc.maxsockbuf', 'value' => 16777216, 'descr' => "Maximum socket buffer size - set by FRR package");

if (!in_array($sysctl_maxsockbuff, $sysctl_conf)) {
update_status("Installing maxsockbuf tunable ... ");
$sysctl_conf[] = $sysctl_maxsockbuff;
write_config('FRR: Installed maxsockbuf tunable.');
system_setup_sysctl();
update_status("Done.\n");
}
}

/* Install-time functions */
function frr_package_install() {
/* Upgrade the configuration */
frr_package_config_upgrade();

/* Set tunable kern.ipc.maxsockbuf to FRR recommended */
/* OSPF and OSPF6 most likely won't work with this */
frr_set_tunables();
}

0 comments on commit 69cb2af

Please sign in to comment.