Project

General

Profile

Actions

Bug #12733

closed

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

Added by Viktor Gurov 5 months ago. Updated 28 days 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

Also available in: Atom PDF