Project

General

Profile

Actions

Bug #12733

closed

Value of ``net.inet.ip.dummynet.*`` OIDs in ``sysctl`` are ignored

Added by Viktor Gurov almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Captive Portal
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
Affected Version:
2.5.2
Affected Architecture:

Description

If you set any net.inet.ip.dummynet.* values on the System / Advanced / System Tunables page,
they are ignored because system_setup_sysctl() runs before dummynet.ko module is loaded in captiveportal_load_modules()

same issue as #10780

https://github.com/pfsense/pfsense/blob/master/src/etc/inc/captiveportal.inc#L220-L227:

    /* Always load dummynet now that even allowed ip and mac passthrough use it. */
    if (!is_module_loaded("dummynet.ko")) {
        mwexec("/sbin/kldload dummynet");
        set_sysctl(array(
            "net.inet.ip.dummynet.io_fast" => "1",
            "net.inet.ip.dummynet.hash_size" => "256" 
        ));
    }

same fix can be used:
https://github.com/pfsense/pfsense/blob/master/src/etc/inc/shaper.inc#L5310-L5328:

        if (!is_module_loaded("dummynet.ko")) {
            mute_kernel_msgs();
            mwexec("/sbin/kldload dummynet");
            unmute_kernel_msgs();
        }
        $sysctls = (array(
                "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'])) {
            foreach ($config['sysctl']['item'] as $item) {
                if (preg_match('/net\.inet\.ip\.dummynet\./', $item['tunable'])) {
                    $sysctls[$item['tunable']] = $item['value'];
                }
            }
        }
        set_sysctl($sysctls);


Related issues

Related to Bug #10780: net.inet.ip.dummynet.* values are ignoredResolvedRenato Botelho07/21/2020

Actions
Related to Todo #13100: Transition Captive Portal from IPFW to PFResolvedViktor Gurov

Actions
Actions #1

Updated by Viktor Gurov almost 3 years ago

  • Related to Bug #10780: net.inet.ip.dummynet.* values are ignored added
Actions #3

Updated by Viktor Gurov over 2 years ago

  • Related to Todo #13100: Transition Captive Portal from IPFW to PF added
Actions #4

Updated by Jim Pingle over 2 years ago

  • Target version set to 2.7.0
  • Plus Target Version set to 22.09
Actions #5

Updated by Viktor Gurov over 2 years ago

  • Status changed from New to Feedback
  • Plus Target Version changed from 22.09 to 22.05
Actions #6

Updated by Jim Pingle over 2 years ago

  • Subject changed from net.inet.ip.dummynet.* values are ignored to Value of ``net.inet.ip.dummynet.*`` OIDs in ``sysctl`` are ignored

Updating subject for release notes.

Actions #7

Updated by Jim Pingle over 2 years ago

  • Status changed from Feedback to Resolved

The code for dummynet_load_module() in source:src/etc/inc/util.inc#L3937 ensures the module is loaded before populating the sysctl values, so this should always be doing the right thing now.

Actions

Also available in: Atom PDF