diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-02-12 16:57:44 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-02-12 16:59:56 -0600 |
commit | 7f283fab1b18bb575537bb8498b16a6b1b6d0251 (patch) | |
tree | e8ca5e786ad930cd6ee76a16d64ddb32939bbdd0 | |
parent | 57b5da701888602edb008fbd55f6e55e18578eb8 (diff) | |
download | pfsense-7f283fab1b18bb575537bb8498b16a6b1b6d0251.zip pfsense-7f283fab1b18bb575537bb8498b16a6b1b6d0251.tar.gz |
Only set IFCAPS where they're not already set correctly. Ticket #5887
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 9788fb4..e18c385 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -177,10 +177,10 @@ function hardware_offloading_applyflags($iface) { $flags_off |= IFCAP_RXCSUM; } } else { - if (isset($options['caps']['txcsum'])) { + if (isset($options['caps']['txcsum']) && !isset($options['encaps']['txcsum'])) { $flags_on |= IFCAP_TXCSUM; } - if (isset($options['caps']['rxcsum'])) { + if (isset($options['caps']['rxcsum']) && !isset($options['encaps']['rxcsum'])) { $flags_on |= IFCAP_RXCSUM; } } @@ -188,19 +188,21 @@ function hardware_offloading_applyflags($iface) { if (isset($config['system']['disablesegmentationoffloading'])) { $flags_off |= IFCAP_TSO; } else if (isset($options['caps']['tso']) || isset($options['caps']['tso4']) || isset($options['caps']['tso6'])) { - $flags_on |= IFCAP_TSO; + if (!isset($options['encaps']['tso']) || !isset($options['encaps']['tso4']) || !isset($options['encaps']['tso6'])) { + $flags_on |= IFCAP_TSO; + } } - if (isset($config['system']['disablelargereceiveoffloading'])) { + if (isset($config['system']['disablelargereceiveoffloading']) && isset($options['encaps']['lro'])) { $flags_off |= IFCAP_LRO; - } else if (isset($options['caps']['lro'])) { + } else if (isset($options['caps']['lro']) && !isset($options['encaps']['lro'])) { $flags_on |= IFCAP_LRO; } /* if the NIC supports polling *AND* it is enabled in the GUI */ - if (!isset($config['system']['polling'])) { + if (!isset($config['system']['polling']) && isset($options['encaps']['polling'])) { $flags_off |= IFCAP_POLLING; - } else if (isset($options['caps']['polling'])) { + } else if (isset($options['caps']['polling']) && !isset($options['encaps']['polling'])) { $flags_on |= IFCAP_POLLING; } |