Commit 3fe64a5f authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

interface offloading, add txcsum6, trxcsum6 for https://github.com/opnsense/core/issues/1227

(cherry picked from commit a801eb11)
parent e5ee28d5
......@@ -245,6 +245,7 @@ function configure_interface_hardware($ifs)
if (!stristr($ifs, "_vlan") && is_array($intf_details)) {
// get current settings
$csum_set = in_array('rxcsum', $intf_details['options']) || in_array('txcsum', $intf_details['options']);
$csumv6_set = in_array('rxcsum6', $intf_details['options']) || in_array('txcsum6', $intf_details['options']);
$tso_set = in_array('tso4', $intf_details['options']) || in_array('tso6', $intf_details['options']);
$lro_set = in_array('lro', $intf_details['options']);
......@@ -254,6 +255,12 @@ function configure_interface_hardware($ifs)
} elseif (!isset($config['system']['disablechecksumoffloading']) && !$csum_set) {
legacy_interface_flags($ifs, 'txcsum rxcsum', false);
}
if (isset($config['system']['disablechecksumoffloading']) && $csumv6_set) {
legacy_interface_flags($ifs, '-txcsum6 -rxcsum6', false);
} elseif (!isset($config['system']['disablechecksumoffloading']) && !$csumv6_set) {
legacy_interface_flags($ifs, 'txcsum6 rxcsum6', false);
}
// TCP segmentation offloading
if (isset($config['system']['disablesegmentationoffloading']) && $tso_set) {
legacy_interface_flags($ifs, '-tso', false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment