Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set net.inet.ip.dummynet sysctl. Fixes #10780 #4403

Merged
merged 1 commit into from Aug 18, 2020

Conversation

vktg
Copy link
Contributor

@vktg vktg commented Jul 21, 2020

"net.inet.ip.dummynet.io_fast" => "1",
"net.inet.ip.dummynet.hash_size" => "256",
"net.inet.ip.dummynet.pipe_slot_limit" => $max_qlimit
));
init_config_arr(array('sysctl', 'item'));
if (is_array($config['sysctl']) && is_array($config['sysctl']['item'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After init_config_arr() these will always be arrays, so this test is unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"net.inet.ip.dummynet.io_fast" => "1",
"net.inet.ip.dummynet.hash_size" => "256",
"net.inet.ip.dummynet.pipe_slot_limit" => $max_qlimit
));
init_config_arr(array('sysctl', 'item'));
if (!empty($config['sysctl']['item'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it needs changed now, but for future reference, this test is also unnecessary. It's harmless to run foreach on an empty array, it is effectively a no-op since the body of the statement never executes.

@netgate-git-updates netgate-git-updates merged commit 05187d0 into pfsense:master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants